Questions tagged as 'swing'

1
answer

How to create TableCellRenderer for strings?

I wanted to know how to do a TableCellRenderer for strings. in this topic here:
asked by 05.11.2016 / 18:17
1
answer

How do I define size of columns?

I have a query screen, and I would like to set the size of the columns because some columns take up more space than necessary. I thought that if I made a comparison with the title of the column, although it might not be the most oriented way to...
asked by 11.11.2016 / 22:47
1
answer

Apply the SyntheticaBlackEyeLookAndFeel in the application

I'd like to know how I can apply new look and feel s that are not part of JDK. In attempting to apply, you are giving an error in which I did not find an answer that could solve the problem. For example: Synthetica Classy Look and Feel :...
asked by 19.08.2016 / 20:46
1
answer

Remove JPanel from view

I would like to know how to remove a JPanel that is within a JFrame . I do not want to use the information or anything, I just want it to close. Using setVisible(false) leaves the panel invisible, I do not want this, I...
asked by 31.03.2016 / 13:00
1
answer

Error trying to change JFrame icon

I'm using NetBeans, however I want to change the default icon for my application. But, I came across this error. Followthecode:importjava.awt.Toolkit;/****@authorrenato.lazaro*/publicclassIconJFrameextendsjavax.swing.JFrame{/***Createsnewfor...
asked by 21.06.2016 / 15:07
2
answers

When to validate fields of a form in swing?

I would like to know if anyone could help me on validating form fields in java desktop. When should I perform the validations, at the field's focusLost or keyPressed, or another more appropriate way. For example: I have a field of type...
asked by 25.07.2016 / 13:50
1
answer

Get value of the item in focus in a JList?

I have a JList and would like to get the value of the item that is in focus in it, I do not want to capture this value with a click or button, but only by changing the focus (clicking on the item or with the up or down arrows). For example: A...
asked by 20.11.2015 / 18:48
1
answer

How do I open a window inside a main Frame?

I'm doing a program and I'm creating the layout manually with swing using GridBagLayout and GroupLayout . I would like to know how to open a window within the program I am doing. For example: When the user clicks the Register...
asked by 05.02.2016 / 18:39
1
answer

Problems in netbeans with connection to Postgres

I have a database called BANK_DE_TESTES in Postgres and it has some random tables. In netbeans when I try to use the Master / Detail Samples Form to use JPA to create a simple crud it does not work saying that the bank I have specified does not...
asked by 19.12.2015 / 19:49
2
answers

Java - Enter Function

In the system there is a field, the person needs to fill in this field and then press enter. When you press enter, the system performs a check and then opens a JOptionpane asking you to select: yes , no , ok etc. The person pres...
asked by 25.09.2015 / 15:30