Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
1 answer
35 views

Make RGB java.awt.Color lighter

Can I take a java.awt.Color, turn it into a HSL color, and make it a notch lighter or darker — that is, increase or decrease the L value by, say ten points (obviously, within the 0 to 100 range)? If ...
Heneh's user avatar
  • 1
0 votes
1 answer
31 views

Wrong JCheckBox painting in pressed state with custom icons

I need a JCheckBox with custom icons However, once I set custom icons, my check box is painted wrong in the "pressed" state Specifically, it always displays the selected icon // snippet 1 ...
Heneh's user avatar
  • 1
-1 votes
0 answers
12 views

How to see network calls JMX URL when have a java Swing application as an UI?

I am working on leagcy java backend application which is build on EJB's and running on RMI server using JMX framework. And further, whose UI is built as a java SWING app. I am facing difficulties how ...
avaneesh kumar Shukla's user avatar
1 vote
1 answer
75 views

Java Graphics2D.drawImage() Renders Blurry Image only on Windows 125% Scaling and Only on Java Versions after Java 8

I know that Java 9 fixed issues with screen scaling and resolution that were present with Swing in Java 8. However, I have a situation where the exact same code renders clearly if being run on Java 8 ...
jmohrmann's user avatar
-3 votes
0 answers
44 views

My program initially displays a red panel with a line drawn on it. Adding a line assigning ImageIcon[] type variable stops the initial display [closed]

If I add the line marked ******* BUG? ********** by removing the comment sign, then the initial display of the red panel does not take place. However as I resize the form the red panel with a line ...
Amitava Guha's user avatar
0 votes
1 answer
42 views

How to acces a Swing UI component without its variable name?

I wanted to create Buttons by clicking on a Button with following code: addButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) {...
Jonah's user avatar
  • 1
0 votes
0 answers
35 views

How to read Objects in a PDF file with Apache PdfBox in Java?

I'm developing a pdf reader/editor program in Java using Swing for UI with Apache PdfBox. I want to get the objects and their states in each of the pdf pages. I mean the text, images, shapes as ...
Yusuf İhsan Şimşek's user avatar
0 votes
0 answers
46 views

I need help making sure my code is thread safe

So I am trying to use SwingWorkers in my application (written in Java) where I collect some data from an API and display it in the app's GUI. Please keep in mind that I am very unsure when it comes to ...
JosephFC97's user avatar
0 votes
2 answers
45 views

Updating callers of PropertyChangeListener in Java + Swing

I'm working with Swing and PropertyChangeListener to manage theme changes in an application. Listeners are notified when the theme property changes in the ThemeManager class. However, I need a ...
IssaKass's user avatar
0 votes
0 answers
31 views

Java swing scrollpane get all component in horizontally

I am making an e-commerce application. In my dashboard frame I have a search panel one product keeper scroll-panel and one menu panel. I want that all my fetched products can be stored inside product ...
Raj Bhut's user avatar
-1 votes
1 answer
27 views

Resize JPanel with animation

I want to make a panel that, when the mouse enters it, its height increases smoothly and when the mouse leaves it, its height decreases smoothly. public class Main { private static final int ...
BaRiBoD's user avatar
-2 votes
0 answers
39 views

lines appears below the panel in java swing [closed]

I'm developing a snake and ladder game using Java Swing. I am trying to draw lines (representing snakes and ladders) under JPanel or JLabel components, but I'm encountering issues with setting the Z-...
Brutus's user avatar
  • 159
-1 votes
0 answers
38 views

How to trigger ItemListener by JCheckBox setSelected(false)?

I found this answer which states that ItemListener#itemStateChanged is useful as it is invoked when pragmatically setting the JCheckBox by setSelected(true). However, this doesn't apply for the case ...
Saleh Rezq's user avatar
-1 votes
1 answer
35 views

How to set image size in JTextPane with HTML and CSS (Java, Swing)?

I want to insert an image (say - a formula compiled from LaTeX) into JTextPane, using HTML+CSS for text markup, manually setting it's size. I tried like here import java.awt.Dimension; import javax....
Andrey Voeyko's user avatar
0 votes
1 answer
38 views

How can I make the tabs in the menu bar with rounded corners and margins in Java/Swing using FlatLaf Theme Editor?

I'm creating a Java application with Swing as the GUI. I'm using FlatLaf themes FlatLightLaf. On the JMenuBar I want to create something like this: VSCode Title Bar But I end up with something like ...
Yusuf İhsan Şimşek's user avatar

15 30 50 per page
1
2 3 4 5
5324