Questions tagged as 'swing'

1
answer

How to detect if the JSpinner value has changed?

I want to perform an action whenever the value of JSpinner is changed. How do I do this?     
asked by 23.01.2018 / 02:36
1
answer

Define text to JLabels dynamically according to validation of text fields

I tried to add a label to each mandatory component of my screen that is empty (field 01 and field 02), so I created a list of labels with the corresponding amount of fields / components. However, the attempts I made to "set" the co...
asked by 04.12.2017 / 20:59
1
answer

Changing the contents of a panel in JFrame

In my application, I have a main screen with a menu. The contents of each menu screen should appear inside a main screen panel, I do not want to open a new screen for every thing. What I need then is to change the contents of the main screen...
asked by 25.10.2017 / 05:37
1
answer

JFrame does not update until button function terminates

When I click the button it calls a method, and until that method finishes the JFrame does not update the program is in the image below privatevoidjButtonBuscarActionPerformed(java.awt.event.ActionEventevt){jTextArea.setText(""); Atua...
asked by 19.10.2017 / 21:32
1
answer

How to disable / enable buttons in one JFrame depending on the option from another JFrame?

I currently have two buttons in a JFrame : one to save and the other to update. In other JFrame , I have to register and edit. When I click on the register, I want the save to be on and update off, and when to edit, vice versa. I...
asked by 17.10.2017 / 16:11
1
answer

Error when trying to implement JTextArea in JTable

I'm trying to use this JTextArea in some columns of my JTable , but it's giving something wrong. I know it's wrong, but I'm using DefaultTableModel . public class TextAreaCellRenderer extends JTextArea implements TableCellRe...
asked by 10.01.2018 / 12:48
1
answer

Java - Full screen in 16Bit

How can I put a JFrame in full screen and change the screen resolution using: device.setDisplayMode(new DisplayMode(Width,Height,16,DisplayMode.REFRESH_RATE_UNKNOWN)); Should I use a new library? Thank you     
asked by 15.10.2017 / 05:26
1
answer

Add a lower menu

I would like to make a lower menu in my java application, to put time and runtime or even some configuration part itself. I already have JMenuBar on top. This is my code. package tela; import componente.MeuJDesktopPane; import java....
asked by 04.08.2017 / 17:52
1
answer

Problem in identifying the time in the Game of the Old

I'm trying to implement the Old Game in Java with Swing, but my counter that defines the moves, does not change, so always displays the same move: import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import java.awt.Grap...
asked by 07.07.2017 / 01:03
1
answer

Place access permission with access restriction

I'm using a code that was already done by someone, I made some modifications about what I wanted. This code has 2 types of access "Administrator and Official" would like that when the person entered with the login of type Employee it could no...
asked by 04.07.2017 / 14:45