Posts by Rodrigo de Bona Sartor • 708 points
15 posts
-
0
votes1
answer122
viewsA: Problem using the Jaybird
Remove the Build path jar. Create a new folder in your project called "libs" Copy the Jaybird-full-2.2.10.jar into the libs folder…
-
1
votes2
answers105
viewsA: Query bringing all records, and filter the repeated
select a.* from mov_pallet a left join mov_pallet b on( b.movpallet > a.movpallet and b.rua = a.rua and b.altura = a.altura and b.posicao = a.posicao and (b.produto != a.produto or b.pallet !=…
-
1
votes2
answers895
viewsA: Add prime numbers within a vector
is because you are using the same variable to control two is chained: create a j variable and use in the second for. failed to reset the cont inside the is also Example: int num[1500], i, j, par =…
-
1
votes1
answer167
viewsA: Jquery - Scrollbar
that would be it? http://codepen.io/goblinbr/pen/dXPLoW function barra() { var larguraVisivel = $(".conteudo").width(); var larguraTotal = $(".conteudo2").width(); var perc = larguraVisivel /…
jqueryanswered Rodrigo de Bona Sartor 708 -
1
votes1
answer504
viewsA: Calculation of Time Estimate
https://jsfiddle.net/axgucsy6/ function calcularTempoTotalPrevisto( horas, minutos, segundos, distanciaPrevista, distanciaPercorrida ) { var horasTotalOcorrido = horas + ( (minutos * 60 + segundos)…
algorithmanswered Rodrigo de Bona Sartor 708 -
1
votes1
answer435
viewsA: POST Spring Data REST does not work with relationships
First you should do the post in State and then in City sending in state the corresponding address. (I couldn’t find any way to send the state as a child object) Example: POST…
-
1
votes3
answers12003
viewsA: Toggle Jpanels within a single Jframe
Follow an example: import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JFrame; import…
-
1
votes2
answers1602
viewsA: Sub report does not appear when running from within the system
try to change: getClass().getResource($P{SUBREPORT_DIR} + "pedidoMeiaPagina_TotalPesoValor.jasper") by just: "pedidoMeiaPagina_TotalPesoValor.jasper" and make sure that the sub report is already…
-
0
votes4
answers1290
viewsA: How to bring a specific result of an SQL query above the others?
SELECT DISTINCT `user_id` AS `id`, `user_name` AS `name`, if(user_name = `Lucas`,0,1) as `ordem` FROM `users` ORDER BY `ordem` ASC, `id` ASC;
-
9
votes2
answers4725
viewsA: Image rotation in java
From what I’ve tested here, so it works: public static BufferedImage rotateImage(BufferedImage rotateImage, double angle) { angle %= 360; if (angle < 0) angle += 360; AffineTransform tx = new…
-
1
votes2
answers653
viewsA: How to increase the width of a Jcombobox?
The FlowLayout uses the pre-rated component size: int largura = 100; int altura = 21; seuComboBox.setPreferredSize( new Dimension(largura,altura) );
-
1
votes2
answers995
viewsA: Progress bar not updated correctly
Turns out the code is calling the setProgress very fast and when the event is triggered the progress is already at 100% If you put a Thread.sleep( 20 ); within the while will see that the event will…
-
0
votes2
answers1204
viewsA: Fixed column of a Jtable in a Jscrollpane
My solution until then: import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; import javax.swing.table.*; public class JFixedColScrollPane extends JScrollPane…
-
4
votes2
answers1204
viewsQ: Fixed column of a Jtable in a Jscrollpane
How do I leave a fixed Jtable column (no scroll) inside a Jscrollpane? I want to leave the first column of a fixed table, the scroll bar will only scroll from the second column onwards, the first…
-
1
votes4
answers1069
viewsA: Select and drag Swing component
I don’t know exactly how you’re creating polygons. But if it is a java.awt.Component, I think that solves it: import java.awt.*; import java.awt.event.*; import javax.swing.SwingUtilities; public…