Questions tagged as 'awt'

1
answer

What is Event-Dispatching Thread (EDT) in GUIs?

When you are learning how to construct graphical interfaces with swing / AWT , you hear a lot about the Event-Dispatching Thread (or EDT ). Although I already have a certain coexistence with
asked by 25.02.2016 / 14:15
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 I determine if a point on a swing component is visible on the screen?

How do I determine if a particular X point inside a swing component is visible on the user's screen? For example, let's assume that% w / w has been added to a B window (usually, but not necessarily, a% w of%). > Using the JComponen...
asked by 11.01.2015 / 13:57
2
answers

JAVA - Draw Polygons (triangles, pentagons)

Well, I wanted to know if anyone could help me, I'm doing a project in which I have to draw several figures, including triangles and pentagons, I've already managed to get the rectangles to work, rectangles: import java.awt.Color; import ja...
asked by 18.12.2015 / 20:31
2
answers

Center Swing Window

I wanted to know how to do when to call a secondary window in Swing it left centered with the main window of the program. At the moment, when I call it it appears in the upper left corner.     
asked by 23.09.2015 / 13:46
1
answer

How to leave the line border drawn with Graphics in Java straight?

I made a program that draws lines on the screen, but the line gets very deformed (image 2) on certain links. I would like to know if there is a way to make the edge of the line straight (image 1), whatever the tilt of it. I'm using Graphic...
asked by 29.03.2018 / 18:39
2
answers

How to get the type of component clicked?

The getSource () method returns the event source, is there any method that returns the event source type, whether it was a jlabel, or jbutton, something like this?     
asked by 06.12.2015 / 22:27
1
answer

Why, when I change the size of the window, do the drawn components disappear?

I built an application using the windowbuilder of eclipse. In it, when clicking with the mouse, a figure is drawn according to the last button selected. However, when I change the size of the window, all the drawings disappear. After rea...
asked by 12.07.2016 / 14:30
1
answer

Get value of the item in focus in a JList?

I have a JList and would like to get the value of the item that is in focus in it, I do not want to capture this value with a click or button, but only by changing the focus (clicking on the item or with the up or down arrows). For example: A...
asked by 20.11.2015 / 18:48
1
answer

Can I create a complete application without using the swing? [closed]

I'm creating a system and a question has arisen! Could you create forms without using Swing, AWT or the basic libraries in Java? If I use another framework, can I leave out the Swing, AWT etc? What better framework to work with today?    ...
asked by 08.07.2017 / 16:38