Questions tagged as 'swing'

2
answers

How to put icon in JOptionPane buttons?

How do I put an icon in the "Continue" and "Cancel" Buttons that appear in the JOptionPane ?? window The case is represented below: public void metodo(){ JPanel panel = new JPanel(); JLabel label = new JLa...
asked by 19.04.2018 / 20:35
2
answers

Difference between AWT and Swing in component rendering

What are the main differences between the Swing and AWT interface building libraries, regarding the way components are rendered and performance rendered?     
asked by 09.01.2017 / 21:16
1
answer

How do you create a "hidden" menu?

I have a Toolbar, and I want to make a settings bar in it. However, in order not to occupy space, I would like to hide / minimize it, something like the teamviewer chat. My ToolBar (it's inside a main screen) Container contentPane = this.ge...
asked by 30.10.2016 / 20:13
1
answer

Differences between listeners and adapters in swing

When programming graphical interfaces in Java using swing , we are always faced with both types, mainly to assign and create events from button actions or other components. Although I've been working with swing for some time, I'v...
asked by 19.02.2016 / 22:49
1
answer

Leave program done in Swing with Windows appearance

I'm developing application with Java Swing, but the screens are not getting windowed out of windows. Example screen. I wanted to leave Windows with the same face, with the title bar with minimize button, maximize and close. The way it i...
asked by 20.08.2016 / 04:20
1
answer

How to draw an arrow using Java2D?

I'm trying to draw an arrow inside a circle (similar to a clock hand), but I can not align the tip of the arrow with the rest of the line. I made the this "arrow" based on this SOEn response, but I can not get it to be properly positioned wi...
asked by 09.10.2017 / 16:30
2
answers

Fill JComboBox with an object

Would you like help filling out a JComboBox with one class. In this class, return two parameters: Id and Desc. Category class I need to show in combo: private int Id_categoria; private String Desc_Categoria; How do I show only...
asked by 28.12.2015 / 02:21
1
answer

Compensates to migrate from Swing to JavaFX?

Currently most of my applications are made with Swing. I've done 2 small web projects with JSF + Primefaces + Hibernate. My question is this: Is it worthwhile to go out of Swing and study JavaFX, or is it better to study the Web part more a...
asked by 13.05.2015 / 16:40
1
answer

How to make the arrow turn several times until it stops by itself after clicking the button?

In the question " How do I rotate an arrow within a circle using Java2D? , I was able to learn how to do the arrow rotates within the circle. But I need to make the arrow spin like a casino roulette, until I stop by myself. I thought about us...
asked by 11.10.2017 / 03:28
1
answer

How to define the order in which the components will receive focus through the TAB?

To organize the focus order of the components up to version 1.4 of java, we used the setNextFocusableComponent() ". However, it was discontinued as of the cited version. I would like to know how I can do this in the latest versions so...
asked by 11.09.2017 / 14:00