Questions tagged as 'swing'

1
answer

How to make a grid with squares?

I would like to do something like this here, a Grid based on an array (and based on the value of the array, set a color to the corresponding cell), and I can manipulate it with the mouse.     
asked by 17.09.2017 / 15:39
1
answer

Doubts with mask in JFormattedTextField

Working with JFormattedTextField , I got two problems that I could not find anything to help me solve. The example in this case would be JFormattedTextField for CPF. First problem: the mask. When I create the mask and run the pro...
asked by 14.08.2017 / 15:55
1
answer

Use of Swingworker in connection with standalone bank

I have an application in java that I did in my work, to control the sequence of numbering of trades, the same is in jar format in the network (I did using swing in java + HSQLDB). One problem that is not critical, but a little annoying, is th...
asked by 18.08.2015 / 12:28
1
answer

How to use setNextFocusableComponent in a JTextArea

I used setNextFocusableComponent in JTextArea , but it does not work because TAB works as a "space" within JTextArea , how to solve it?     
asked by 19.12.2016 / 04:29
1
answer

I can not leave JButton on top of JLabel

I have JPanel , and inside it a JLabel of same size. JLabel has an icon associated with it, working as a wallpaper. When I try to put a JButton on top of the JLabel, NetBeans repositions the 2. Would anyone know to answer me...
asked by 22.05.2016 / 05:53
1
answer

How to format field for RG with issuing body?

I have the following java class: public class TesteRG { public static void main(String[] args) { String RG = "24.77.195 ssp/pb"; Pattern pattern = Pattern.compile("\d{2}.\d{2}.\d{3}\s\w{3}/\w{2}"); Matcher matcher = pattern.matc...
asked by 27.03.2016 / 19:08
1
answer

Matrix in Forms

I'm having trouble creating an array within a JPanel in NetBeans, I've tried customizing the code by putting the code inside the NetBeans customization: jPanel1.setLayout(new GridLayout(15,15)); JLabel[][] grid =...
asked by 11.11.2014 / 17:47
1
answer

Create data validation and page sequence

I'm starting in Java and want to make a screen where the person signs the login and the password, the system stores the data and then in a new window is asked to enter the user and password, I did the part of validation and registration of the d...
asked by 28.08.2014 / 15:09
1
answer

IllegalArgumentException when reopening jInternalFrame multiple times

I have an application that is validating when the JInternalFrame window is open or closed, but if the window is opened and closed a few times in a row, the console displays an error and does not open JInternalFrame again. > Wind...
asked by 22.05.2018 / 22:58
1
answer

How to validate a text field with InputVerifier?

Normally when I need to validate a text field without using action events, I use focus events, such as those available through the FocusListener . In this example, I check if the field was filled out when I lost focus, and I returned...
asked by 06.10.2017 / 16:07