awt Questions

2

I am trying to find a way how to determine which libraries does Java require for Desktop API to work, specifically the BROWSE function. I read a few guides, bug reports and workarounds, but none of...
Revelatory asked 23/10, 2015 at 7:2

7

Solved

I would like to export the image in my JPanel to a vector graphics file so it can be edited and printed at a higher-than-screen resolution. Essentially I want its paint() function to be called with...
Illogicality asked 1/5, 2009 at 15:40

2

I am trying to create a rectangle in Java but only with awt package classes. I can only click two points and the program must calculate the width and height and draw a rectangle between those exa...
Fellow asked 15/5, 2013 at 11:8

4

Solved

I'm using java.awt.FileDialog to create a dialog for saving a file. The problem is that when I specify a suggested (default) file name, FileDialog strips its extension. Example: import java.awt.*;...
Libre asked 28/2, 2011 at 16:18

1

Solved

I am developing a JavaFX application on Windows 8.1 64bit with 4GB of RAM with JDK version 8u45 64bit. I want to capture part of the screen using Robot but the problem is that I can't get the scre...
Biotin asked 4/8, 2015 at 10:51

2

I am working on Swing application mixed with JavaFX control. I have created a JavaFX control (WebView) to browse HTML files. But I want to know, how can I add this web view control on the contai...
Pleiades asked 21/11, 2012 at 6:46

1

I just want to draw the circle which is exactly 15x15 pixels sized, and have fill and outline. I'm using Java2D. The problem is, as a result of sequentally called Graphics2D.fill(circle) and Graphi...
Baram asked 4/9, 2014 at 8:56

2

I have a Java program taking 100% cpu, but seemingly doing nothing. If I take a thread dump, there are 4 threads (out of a pool of 5) waiting to take a lock. "Incoming WorkPool 5" - Thread t@363 ...
Hysteria asked 14/4, 2015 at 13:21

3

Solved

I am learning Java and would really like to have a deeper understanding of what the ActionEvent e perameter means and stands for. When I code I don't just want to spit out lines that work, but I do...
Klehm asked 4/7, 2015 at 1:41

3

Solved

I have a JTextArea for which I have set word-wrap and wrap-style-word to true. I want to "pack" the JTextArea to the minimum possible height given a specified width. To do this, I'm planning calcu...
Dyedinthewool asked 16/6, 2011 at 3:25

1

Solved

How can I conver one to another? I thought a way via rgb string, but this case alpha layer is ignored. So the question - how to convert one to another with alpha?
Herring asked 26/5, 2015 at 18:41

2

Solved

I have created a dialog in which a user can browse for an image and then see a preview of the image drawn on a canvas. The image is scaled so that its aspect ratio is maintained while fitting in th...
Aesthetically asked 8/10, 2013 at 20:54

1

Solved

I have been trying to resolve this without success. How to make JPanel p respect the defined GridLayout? All I get is the first row containing 3 panels but not 4 as I've told Java to perform. What...
Queston asked 17/4, 2015 at 22:2

1

Are there any changes than came with Swing and AWT in Java 8? In release notes for Java 8 I it's not mentioned.
Camisole asked 17/4, 2015 at 3:45

1

I know that you can import a Font in Java with something like this: File file = new File(fontPath); Font font = Font.createFont(Font.TRUETYPE_FONT, file); // alternative: // Font font = Font.creat...
Latricelatricia asked 17/7, 2014 at 10:18

1

Solved

I did some Win32 GUI programming several years ago. Now I am using Java Swing. Just out of curiosity, where is the Swing counterpart of Win32 message loop logic? In Win32, it is achieved with the ...
Hyperpituitarism asked 31/3, 2015 at 2:43

1

Solved

I know Swing use Java2d which extends AWT to draw on screen but, what low level toolkit is used by swing to render? GTK or QT for example?
Fitzger asked 3/4, 2015 at 22:5

3

Solved

The javadoc said: For efficiency, programmers should call dispose when finished using a Graphics object only if it was created directly from a component or another Graphics object. So in the...
Cooler asked 26/3, 2015 at 8:46

3

I created an interface and I'd like to add a function that allows user to open a file. I'm using AWT. I don't understand how to use FileDialog. Can you please give me an example or a good link that...
Manic asked 26/8, 2011 at 22:20

1

I'm trying to serialize a BufferedImage in Java, but running my program I received a NotSerializableException. Looking at the BufferedImage class, I noticed that it does not implements Serializabl...
Amadus asked 10/3, 2015 at 0:18

3

I'm developing a fairly complex Java application mixing Swing and SWT. Whenever I start the application, this is the console output (and the app doesn't show up): 2012-12-19 12:45:45.359 java[3442...
Inamorato asked 19/12, 2012 at 11:53

3

Solved

I am developing a Swing application with a component performing custom painting. When I make some mistake in the painting code and an exception is thrown, the situation is hard to debug. Instead of...
Dishman asked 22/12, 2014 at 13:7

4

Solved

We'd like a trace in our application logs of these exceptions - by default Java just outputs them to the console.
Theogony asked 18/9, 2008 at 19:4

1

I have a custom Icon which uses a TexturePaint as paint and calls fillPolygon on a Graphics2D object. This code works fine on JDK6 and JDK7, but fails under JDK8 with 64bit Linux (tried most recen...
Gingivitis asked 29/10, 2014 at 13:44

2

Solved

After much looking, I found a bit of code that converts a BufferedImage to a SWT Image (don't bother reading it yet): public static ImageData convertToSWT(BufferedImage bufferedImage) { if (buffe...
Pup asked 27/6, 2011 at 20:20

© 2022 - 2024 — McMap. All rights reserved.