Posts by Vinicius Silva • 300 points
17 posts
-
0
votes1
answer315
viewsQ: How to fire a method after editing an Integer column in Jtable
I need to call a method that shows the user any message. This method should be called at the exact moment the user finishes editing a Jtable column of type Integer and the user has not entered an…
-
2
votes2
answers1331
viewsQ: How to change the vertical grid line size of a Jtable?
How do I change the size of the vertical grid lines of a Jtable? Ex: jTable.setRowHeight(30); This method above changes the line width. Have some other similar to this which changes the vertical…
-
8
votes2
answers749
viewsQ: How to put icon on Joptionpane buttons?
How do I place an icon in the "Continue" and "Cancel" buttons that appear in the JOptionPane? The case is represented below: public void metodo(){ JPanel panel = new JPanel(); JLabel label = new…
-
0
votes1
answer1025
viewsA: Averaging the sequence of while
You can use %2 operator (module) which returns the rest of the division. If (numeroum%2==0) means it is an even number inside a loop would look like this int a=0;// pra salvar a soma de todos os…
-
0
votes1
answer1530
viewsQ: How to make a Criteria Join for this query
While researching a little I realized that there are some ways to make a Join using criteria. One of them is using an alias and the other using a root. How to do the query below in Criteria using…
criteriaasked Vinicius Silva 300 -
0
votes0
answers39
viewsQ: Criteria releasing Java heap space due to the size of Clause Restrictions.in()
I am trying to run a query using Criteria but it is returning a "Java heap" Exception. It’s probably because of the amount of data I’m going through in the "in" here below a code that represents my…
-
0
votes1
answer171
viewsQ: Doubt in HQL when doing Sum function
I have a doubt in hql. My system has 3 tables Tabela1 and table 2 and table 3 table 3 stores the primary key records of Table 1 and table2 for making relationships. Table 1 can contain N…
-
0
votes3
answers931
viewsQ: Sql Help that queries 2 fields from the same table
I have the following problem to solve: I need to make an Sql that refers to an X table "Tabela X": id coluna1 coluna2 "Tabela 2": id coluna1 coluna2 coluna3. In "Table X" column 1 and column 2 are…
-
3
votes1
answer562
viewsQ: How to optimize Hibernate query
I am developing a system in JAVA and use Hibernante to generate my queries with the bank. I need to solve the following problem: I have some classes that belong to an entity and I need to execute a…
-
0
votes1
answer105
viewsQ: Connection error while using Hibernate Logs
I am trying to see the Hibernate generated sqls in my JAVA application but I am having problems because when adding the two commands below are launched some exceptions. Commands I am inserting into…
-
0
votes0
answers193
viewsQ: How to Optimize Java Connection with Postgres
My connection class with the database is taking too long to open the connection, it takes almost 20 seconds. Hibernate Usage and the Bank is Postgres running localhost. Am I doing something wrong?…
-
1
votes2
answers103
viewsQ: Doubt with Joins in HQL query
I have the following problem when conducting a bank consultation with HQL The table tabela1 has approximately 20000 records. The other tables have "N" records. The table tabela1 has relationships…
hqlasked Vinicius Silva 300 -
0
votes1
answer85
viewsA: Jbutton’s actionperformed does not open the Frame before finishing all events
It worked. The modifications stayed like this: public class NewClass { public void genericMethod() { JFrame frame = new JFrame("JFrame Example"); JPanel panel = new JPanel(); panel.setLayout(new…
-
0
votes1
answer85
viewsQ: Jbutton’s actionperformed does not open the Frame before finishing all events
I have the following problem: By clicking on Jbutton I want to open a Waiting Frame that asks the user to wait a few moments and meanwhile the program will process the query methods that take some…
-
0
votes1
answer698
viewsQ: How to align Jbutton text to the left of the icon?
I need to align the text of JButton the left of the icon as I do? I tried to use the method button.setHorizontalAlignment(SwingConstants.LEFT); but this method does not align the text the way I want…
-
1
votes2
answers113
viewsQ: How to make a query per ID in HQL using the LIKE operator?
How do I make this consultation in HQL? select * from entidadeQualquer where id::text like '%12'; I tried the code below but it didn’t work: select c from entidadeQualquerc where c.id like '%12';…
-
-1
votes1
answer710
viewsQ: How to dynamically change model data when changing the value of the list that fills it?
I have a Jtable where I have a column by the name of colun1 I want to know how I can alter Jtable’s data when any data on the list that fills it out changes. Example I have a list with listString…