Questions tagged as 'swing'

3
answers

How to set index when inserting item in JComboBox?

I wonder if anyone could help me. I'm trying to add items to a JComboBox : Pessoa carlos = new Pessoa(12, "Carlos" , 0.0f); jComboBoxF.addItem(carlos.getNome()); Pessoa maria = new Pessoa(23, "Maria" ,0.0f); jComboBoxF.addItem(maria.getN...
asked by 23.07.2015 / 20:31
1
answer

Create document templates in Java

I'm creating a Java system with Swing, where I would have document templates, and would populate with user-entered data in a form I've already created, so that it generates a template PDF filled with the data. I tried to do it in a "raw" way,...
asked by 31.07.2015 / 20:31
1
answer

How to put a JLabel above the buttons in a JDialog?

I would like to put a label in a JDialog, but above the buttons there. How can I do this? I get all the components online: private void jFormattedNumMatriculaComercialMouseClicked(java.awt.event.MouseEvent evt) {...
asked by 07.11.2014 / 13:47
1
answer

How to make a button blink?

I created a simple code for a game similar to Genius, where a random button on a set of 20 buttons starts flashing, but I can not seem to break the color change. Here is an example, basically I just need the color of the button to change rand...
asked by 09.05.2015 / 12:46
1
answer

"Transparent" text in java

I wanted to make a text like this: Thistext"transparent" when clicked it disappears and if you can start writing in dialog ... does anyone know how to do this in Java? Help me out!     
asked by 13.03.2015 / 02:47
1
answer

Update a Jtable within a Jframe through another Jframe

I have a JFrame , where inside it has a JTable and a JButton (Change) that calls another JFrame. In this other JFrame, a change of data is performed according to the row selected in the table and saved in the DB when clicking...
asked by 24.07.2017 / 17:21
2
answers

Refresh ComboBox that receives a list from another panel

I have a screen where I register a movie, and I play for a ArrayList with a Movie class, which contains some attributes such as title, year, nothing else so far. So I want it on my other screen where I have a comboBox called "Select Mo...
asked by 03.12.2016 / 23:12
1
answer

How do I create a showOptionDialog method that defaults to "no"?

I want confirmation messages from my system to behave with the default value of "no". I did this by doing this: private void jButtonActionPerformed(java.awt.event.ActionEvent evt) { Object[] options...
asked by 14.10.2017 / 03:37
1
answer

Break loop in java

My Java project is a headlamp control with Arduino. So far so good. However I did a function in which the leds gets automatic in a loop after a RadionButton is selected. My problem is that when I select RadionButton my JFrame...
asked by 18.11.2016 / 07:39
1
answer

Is it possible to open windows generated from netbeans in Window Builder?

I've migrated some projects in
asked by 17.11.2016 / 18:16