awt Questions

2

Solved

JPanel.add(ButtonGroup); Is not working. I MUST add it to a JPanel because I am using tabs. This is getting really frustrating.I hace not found a way yet
Citation asked 22/9, 2013 at 8:28

5

Solved

I want to get the name of the button object on clicking the button using Swing. I am implementing the following code: class test extends JFrame implements ActionListener { JButton b1,b2; test()...
Courteous asked 12/12, 2012 at 3:56

5

Solved

Using Java, is there any built-in way to render text so that its limited to a rectangle on a graphics2D object? I know I can use Graphics2D.drawString but it only draws a sinlge line of text. I a...
Namecalling asked 26/8, 2012 at 11:13

5

Solved

I have listed all available fonts in system by calling GraphicsEnvironment graphicsEnvironment = GraphicsEnvironment.getLocalGraphicsEnvironment(); Font[] fontNames = graphicsEnvironment.getAll...
Alibi asked 27/3, 2014 at 8:18

2

I've connected to Solaris 11 from my windows machine. I've set DISPLAY to my machine. And I'm using Java 8. Note: This worked fine when using Java 6. When I'm launching dialog then its button and...
Yon asked 4/8, 2015 at 10:46

9

Solved

Can someone please explain me what's the difference between Swing and AWT? Are there any cases where AWT is more useful/advised to use than swing or vice-versa?
Clavier asked 3/1, 2009 at 9:43

5

Solved

I am Making a Simple App using JavaFX UI, The app simply just do that: has a systray icon, which when clicked shows a window, when clicked again hides it, on rightclick shows a menu with 1 "exit"...
Halloween asked 24/9, 2012 at 19:13

6

Solved

Is there out any Java library that allows converting text content to image files? I only know of ImageMagick (JMagick in this case) but I wouldn't like to install any external binaries (my app will...
Paulie asked 14/9, 2013 at 10:23

3

Solved

I have some errors atm while im coding with JAVA, I have been trying to fix this for along time, also trying to find oterh ppl who have same problem and fixed it but nothing work... Well.. here is...
Cheri asked 5/4, 2013 at 16:44

5

Solved

The default behavior of a GridLayout is that the components are filled row by row, and from left to right. I wonder if I can use it so that the components are filled by columns (from left to right)...
Sulfapyrazine asked 30/6, 2011 at 12:31

1

Solved

I have an application that generates PDF reports (using JasperReports), however if I run my application on my development laptop the text fields have a slightly different size than when I generate ...
Tympan asked 11/9, 2020 at 14:54

1

Solved

tl;dr Under Windows 10, if I put my secondary display to the right of the primary one, and apply a scaling (e.g. 150%) to the secondary, then the display coordinates (as returned by the Java API) o...
Basketry asked 7/9, 2020 at 0:24

10

Solved

I am planning on making a Java Swing application and was wondering if Swing is still used or if it has been replaced with something else. Thanks in advance!
Karrikarrie asked 8/6, 2010 at 1:44

10

How do you set the background color for a JFrame?
Rochester asked 4/7, 2009 at 4:26

4

I have a simple class that draws a line when mouse dragging or a dot when mouse pressing(releasing). When I minimize the application and then restore it, the content of the window disappears excep...
Zebulun asked 11/4, 2012 at 16:54

6

How can I check that JButton is pressed? I know that there is a method that its name is "isEnabled" So I try to write a code to test. this code have 2 Jbuttons which are "Add" Button and "Checko...
Classics asked 27/12, 2013 at 10:35

6

Solved

I use: CheckboxGroup cg = new CheckboxGroup(); Checkbox c1 = new Checkbox("A", false, cg); Checkbox c2 = new Checkbox("B", false, cg); Checkbox c3 = new Checkbox("C", true, cg); To create a ...
Pulchritude asked 11/12, 2014 at 12:58

4

Solved

I have created a custom shape, essentially it is a collection of four Arc2D objects. When these arcs are drawn they form what could be considered a four point rounded star shape, kind of like a cl...
Tormentil asked 26/7, 2010 at 16:50

1

We are sometimes getting this strange error from clients (automatically, no user report was filled until now), and none of us can make sense of it. A user starts our Swing Java-Web-Start "fat clien...
Mazuma asked 16/2, 2016 at 15:58

4

Solved

We just upgraded a server from RHEL v7.3 to v7.4. This simple program works in RHEL v7.3 and fails in v7.4 public class TestJava { public static void main(String[] args) { Font font = new Font...
Bromley asked 8/8, 2017 at 13:13

5

Solved

In AWT application I need to set border color of TextField. In JTextField, I know that we do can do the following JTextField tf = new JTextField(); tf.setBorder(BorderFactory.createLineBorder(Col...
Terbecki asked 28/9, 2011 at 11:5

8

Solved

I am working on part of a Java application that takes an image as a byte array, reads it into a java.awt.image.BufferedImage instance and passes it to a third-party library for processing. For a u...
Innocuous asked 12/6, 2012 at 23:45

2

Solved

I'm trying to set the icon of a Java AWT application so it renders in native resolution on the Windows 10 taskbar (including when desktop scaling is set above 100%). It seems that by default, if an...
Echidna asked 15/3, 2019 at 18:22

7

Solved

I am trying to install Visual Paradigm for UML. During the installation it crashes. This is the stack trace: Unpacking JRE ... Preparing JRE ... Starting Installer ... java.lang.NoClassDefFoundErr...
Bastinado asked 2/1, 2013 at 6:2

3

Solved

We would like to use some of our existing Java AWT graphics code on the Android platform. As far as I can tell, Android does not include any of the AWT classes -- no Graphics2D, Path2D, FontMetrics...
Contextual asked 25/4, 2011 at 21:42

© 2022 - 2024 — McMap. All rights reserved.