Top "Awt" questions

The Abstract Window Toolkit (AWT) is Java's original platform-independent windowing, graphics, and user-interface widget toolkit.

Drawing a nice circle in Java

I'm using Java Graphics and I keep getting "ugly" circles. Here's what my Java program makes And here's the same …

java graphics awt geometry java-2d
JTable - ActionListener for select a row

I need the right AcionListener for my JTable. At program start there is no row selected by default. If I …

java swing jtable awt actionlistener
paintComponent() vs paint() and JPanel vs Canvas in a paintbrush-type GUI

I got some interesting ideas and criticism from this, this and this post (see last post for the code of …

java swing user-interface awt jpanel
KeyListener in Textfield not firing when press enter

I'm trying to make a program that can converts fahrenheit to celcius in java. In program i have 2 Labels and 1 …

java swing awt listener keylistener
Add WebView control on Swing JFrame

I am working on Swing application mixed with JavaFX control. I have created a JavaFX control (WebView) to browse HTML …

java swing awt javafx-2 javafx
Java Swing: Changing border width/height on BorderLayout

I am a newbie to Java Swing. I am trying to make a frame containing three buttons; one in the …

java swing awt layout-manager border-layout
How to get real string height in Java?

I'm using FontMetrics.getHeight() to get the height of the string, but it gives me a wrong value, cutting off …

java fonts awt
Drawing a bold line with drawLine() when extending Canvas

Given the following : public class NavigationCanvas extends Canvas implements MouseListener,MouseMotionListener,KeyListener { public void paint(Graphics g) { // some code // more // ... …

java awt java-2d java-canvas
How to place components at specific positions?

How to place components in layout on specific position. Like I want to place 2 text boxes in first row, below 3 …

java swing awt flowlayout
How to detect JFrame window minimize and maximize events?

Is there a way to an event listener to a JFrame object to detect when the user clicks the window …

java swing jframe awt windowlistener