Questions tagged [swing]
Swing is a user-interface toolkit in Java and is shipped with the standard Java SDK. It is contained within the package javax.swing.
swing
81,365
questions
0
votes
0
answers
44
views
Best Java Swing layout manager for proportional panes, etc. heights [closed]
I want to keep the proportions for various JPane sizes upon resizing the window (e.g. 10% text box, 90% text pane, etc.) in order for complete consistency. I've been using JSplitPanes as a stopgap, ...
-1
votes
1
answer
40
views
How to pause execution for X milliseconds in AWTEventQueue
I have a game where I want to flash a component a red color, and then back to its normal color after a short delay. Obviously, I could just do Thread.sleep(123), but that is EXTREMELY undesirable ...
0
votes
0
answers
25
views
Icon-only JButtons layering the icon of the most recently clicked JButton when clicked [duplicate]
I'm using java swing components to build up a goofy, very simple RPG java app, and I've run into this weird behavior where when I click on a JButton, it duplicates the icon of JButtons I've pressed ...
0
votes
0
answers
36
views
How to open a JFileChooser with the file sort being last modified?
I want to open a JFileChooser with the sorting option being set to modified descending by default.
Anyone have any ideas?
(I'm relatively new to swing)
Cheers
I've found this older solution but it ...
0
votes
1
answer
41
views
How to make translucent image in Java with swing?
I am making a game using Java's swing.
There is a part during the game where a certain image needs to be exposed on the screen with 50% transparency, but I don't know how to make that image ...
0
votes
0
answers
31
views
Java Layout(Swing) layout related problem [closed]
When I set the parent container as FlowLayout then their child does not resizable.
i want to resize their(parent container) child.so that i can overcome my problem
and successfully design my ...
0
votes
1
answer
42
views
Java Mail Mailgun GUI project attaching images and not embedding them
This is the first time I've written something in Java so I'm leaning slowly but I am hard stuck on how to fix this issue. I'm having an issue getting the images that a user inserts into my JEditorPane ...
-1
votes
1
answer
44
views
How do I scale or set the the size of an ImageIcon in Java?
I can not find a way to set the size of an ImageIcon placed in a JLabel. I i.e. want to load image with size 32x32, but paint in size of 16x16 pixel (or 144 dpi).
I can no where find a way to set the ...
0
votes
0
answers
36
views
Issue with my Music Equalizer java program not doing anything when I open a .mp3 file
Image of ProgramI'm working on a Java Swing application that includes a music equalizer. The application is supposed to allow users to select an MP3 file and visualize the audio levels in real-time. ...
-7
votes
0
answers
37
views
Using script to change JTextArea font doesn’t change it and stops me from closing GUI [closed]
like when i changed the font in my combo box everything worked find but when i used script to do it the runbutton btw the textarea font on the gui doesnt changed and it even stop me from closing the ...
0
votes
0
answers
50
views
Java Swing Custom zoom Panel
I am experiencing an issue with the zoom panel action in Java Swing. I have customized a class ZoomableJPanel to zoom innerPanel, but the ZoomableJPanel does not correctly handle zooming, causing the ...
0
votes
0
answers
35
views
How do you make JScrollPane fill multiple rows in GridBagLayout?
I have a JScrollPane that has a JTextArea in it. I also have a JPanel panel = new JPanel(new GridBagLayout) and a GridBagConstraints constraints = new GridBagConstraints() and this GridBagLayout is a ...
1
vote
2
answers
66
views
Java JSCrollPane won't resize below minimum size of JButton with text
I'm trying put a JPanel (GridLayout 0, 1) with JButtons it, within the ViewPort of a JScrollPane. This is easy enough to do, but it doesn't behave "properly" when resizing the parent JFrame....
0
votes
2
answers
72
views
How can I install java Swing in 2024 (for eclipse)?
In the past I have made graphical interfaces with Java Swing. On my new computer I have tried to install java Swing but I have not found how to do it. I have searched in eclipse marketplace but it ...
0
votes
2
answers
41
views
How to display a popup menu during a drop operation
I have an application where I allow strings to be dragged and dropped on to one of the components. This works fine.
Now I want to be able to add customization options to this operation. My first ...