awt Questions

4

Solved

I am having a error for my GUI. Trying to set title bar icon then be included in a Runnable JAR. BufferedImage image = null; try { image = ImageIO.read(getClass().getClassLoader().getResource("re...
Julietjulieta asked 25/3, 2012 at 21:32

6

Solved

Hi there I'm new to GUIs in Java and was trying to make a splash screen or an image appear for 3 seconds. Then after that it it will go onto my main program. Does anyone have an ideas how to do thi...
Acuff asked 21/4, 2013 at 18:14

9

Solved

I cannot load a font from an S3 Inputstream in JRE 8. I do not have issue if a system is installed with JRE 7, JDK 7, or even JDK 8. val fontInputStream = s3Client.getObject(bucketName, objectKey)...
Chessa asked 3/6, 2015 at 16:50

5

Solved

I would like to get the effective screen size. That is: the size of the screen without the taskbar (or the equivalent on Linux/Mac). I am currently using... component.getGraphicsConfiguration().g...
Graber asked 12/4, 2012 at 12:37

2

Solved

I have two different-sized monitors, connected together using (I believe) TwinView. I tried System.out.println(Toolkit.getDefaultToolkit().getScreenSize()); and get java.awt.Dimension[width=29...
Bartel asked 18/5, 2009 at 12:50

21

Solved

What's the easiest way to centre a java.awt.Window, such as a JFrame or a JDialog?
Vorster asked 28/9, 2008 at 0:48

6

Exception in thread "main" java.awt.HeadlessException: No X11 DISPLAY variable was set, but this program performed an operation which requires it. at java.awt.GraphicsEnvironment.checkHeadless(Gr...
Canaigre asked 7/3, 2011 at 11:3

12

Solved

We have a Java application that needs to be brought to the foreground when a telecontrol mechanism activates something in the application. In order to get this, we have realized in the called meth...
Nankeen asked 21/11, 2008 at 15:0

6

Solved

I have a problem following from my previous problem. I also have the code SwingUtillities.invokeAndWait somewhere else in the code base, but when I remove this the gui does not refresh. If I dont r...
Kinesics asked 12/3, 2010 at 19:49

4

Solved

The following screenshot shows a test of TextBubbleBorder1. I would like to make the corners of the component that are outside the rectangle to be entirely transparent & show whatever component...
Philemon asked 22/2, 2013 at 13:13

8

Solved

I am trying to implement a JScrollPane with a JTextArea. The JTextArea is being appended to, and I want the JScrollPane to keep scrolling down as more text is added. How can this be achieved?
Discontinuity asked 20/3, 2010 at 15:23

7

Solved

I have added an image for my button,but when I run that frame this exception will be thrown .why?please help me. init: deps-jar: compile-single: run-single: Exception in thread "AWT-EventQueue-0"...
Aboard asked 7/1, 2010 at 11:33

3

Solved

In my program, I want to use a JSpinner for a number. This number will later be used to calculate something. Every time the user clicks one of the spinner buttons (up or down), I want the result to...
Houdon asked 26/4, 2013 at 19:10

4

I have a SQL database and I am working on a program that will allow me to add/delete/modify records. I already managed to add records I am working on editing/deleting them. I want to display the e...
Varhol asked 24/5, 2013 at 20:47

5

I'm trying to make a program that can converts fahrenheit to celcius in java. In program i have 2 Labels and 1 TextField for input. I want to make convert temperature when user types the temperatur...
Neaten asked 13/1, 2013 at 23:33

4

Solved

when we migrated from Oracle JDK-8 to Open JDK-11, Apache POI excel generation has issues tried already -Djava.awt.headless=true org.springframework.web.util.NestedServletException: Handler dispatc...
Raising asked 1/4, 2019 at 11:26

3

There is a mouseMove()method that makes the pointer jump to that location. I want to be able to make the mouse move smoothly throughout the screen. I need to write a method named mouseGLide() which...
Graeco asked 22/2, 2012 at 0:30

1

The title pretty much explains it. Autocomplete won't work in Eclipse, but only when I use it on objects related to java.awt. The methods overriden from Object appear, but that's it. Here's a...
Reborn asked 10/10, 2021 at 0:24

2

Solved

I am observing some inconsistent behaviour between OS and Java versions when calling JDialog.dispose to dispose a JDialog (also occurs for JFrame). The simple sample application, below, can be us...
Sidesaddle asked 5/11, 2013 at 4:19

3

Solved

Working on a help system, I'd like each component to offer some help when the the mouse is over it and the "?" key is pressed. Sort of like tooltips, except with much more extensive help - essentia...
Oech asked 7/6, 2014 at 18:59

7

Solved

I am studying a java tutorial and saw that the way to find the x/y indexes of a JButton inside a GridLayout is to traverse a bidimensional array of buttons b which is associated to the layout and c...
Sporadic asked 9/10, 2011 at 9:55

3

Hi I'm able to add TrayIcon to the SystemTray and can remove the same form SystemTray. How to remove an existing TrayIcon. I could not get the Object to available TrayIcons to do it. Below is my ...
Elemental asked 7/2, 2014 at 9:27

2

Solved

I have installed the Eclipse [Version: Photon Release (4.8.0)] and JDK 10 on a MacBookPro with macOS 10.13.5 When I write in my code: import java.awt.*; I get the error: The import java.awt c...
Tahoe asked 24/7, 2018 at 16:5

4

Solved

I'm currently writing a template Java application and somehow, I'm not sure about where the ActionListeners belong if I wanted to cleanly follow the MVC pattern. The example is Swing based, but it...
Thurifer asked 22/10, 2014 at 22:0

4

Solved

Is there a way to calculate the length of a string in pixels, given a certain java.awt.Font object, that does not use any GUI components?
Unhouse asked 12/11, 2012 at 14:42

© 2022 - 2024 — McMap. All rights reserved.