Questions tagged as 'swing'

1
answer

How to change the Look and Feel of an application?

Can anyone explain how I can change the layout of my application's windows? I was building the application and testing the main method normally, but since it took a long time to wait to connect to the server and still have to log in ev...
asked by 26.08.2016 / 18:55
1
answer

How do I add an event to the TrayIcon notification balloon?

I have an application that uses the TrayIcon class and I'm displaying a message through the displayMessage() method. (A small "balloon" that rises from the icon represented by my TrayIcon). The method call is as follows: tray....
asked by 04.08.2016 / 17:30
1
answer

Minimize application for the system tray

I made an application as requested by a client, but at the end of the project the same informed me that the application should open in Tray Icon, and the minimized continue running in tray My application is already fully developed, tray icon...
asked by 15.07.2016 / 15:40
1
answer

Return focus to a JFormatedTextField after clicking button

I need to click on the Clear button on the Login screen, the CPF and Password the cursor will return to the CPF field. JFormattedTextField ftUsuario = new JFormattedTextField(); try { MaskFormatter formatter;...
asked by 06.10.2016 / 19:29
1
answer

How to put title in JDesktopPane?

I'm developing software for an MVC (Model-view-controller) design video store with the Java Persistent Api Framework and the XML language. My question is: How do you place and edit title in JDesktopPane ? Example: Iwantedtochangethe...
asked by 08.06.2016 / 20:11
1
answer

How to center a JFrame on the computer screen?

I am using the NetBeans builder GUI to do some things with Swing and would like to center the JFrame , which is my application, on the computer screen. However, I do not know where I edit this part. Where is it when the program runs:...
asked by 08.04.2016 / 21:39
1
answer

Execute actions from the selected item in JComboBox

I wanted to assign value to another class, whichever is selected in JComboBox . For example, if the "Active" item in a combo is selected I wanted to assign a value to a string of an external class if the user had put the combo item "Idle"...
asked by 13.03.2016 / 21:29
1
answer

Validate JDateChooser

I'm having trouble determining if the user filled in a date field of type JDateChooser , I'd like to do a validation to see if it's empty or not. I tried to do it by looking at the JDateChooser documentation, it did not work very we...
asked by 23.04.2017 / 07:02
1
answer

Show text typed in text field after button click

The code below I got from the internet is working for me. In main , it executes a form with the name to type and the ok button. I wanted to run in main , right after the new MeuPrograma(); a System.out.println("#...
asked by 15.01.2016 / 19:09
1
answer

JDateChooser and JComboBox picking up blank values

I'm having some problems trying to capture the value of some elements of my code. 1st - Problem with JDateChoose component The code runs smoothly however the captured value goes blank, follows code String dtreceb = ((JTextField) this....
asked by 20.04.2016 / 03:27