Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
1 vote
2 answers
88 views

Can I do something like this? Or will the asynchronous nature of swing updates make it possible for this to be a bug? In other words, can I rely on the selected index being updated before I read it, ...
Aisaax's user avatar
  • 624
0 votes
1 answer
78 views

Suppose you have a JTabbedPane. One of its tabs is populated expensively (e.g. with data loaded from a DB). The tab is not initially selected so its content is not showing immediately. How do you ...
Best practices
0 votes
15 replies
87 views

Suppose you have a JTable (which may or may not have any rows) with already added columns of a custom type. JTable table = new JTable(); // actually, a custom JTable type, but it's not the ...
1 vote
1 answer
84 views

I have tried making my own tab UI and I can never quite get it to work. This code below is the main class that makes the app and the tab panel. I am trying to make it so I can change what the selected ...
Best practices
0 votes
11 replies
50 views

I want to display and configure multiple objects of the same class at the same time, while keeping up the good looks of a table. So: one line per entity, with multiple GUI elements per line for the ...
1 vote
3 answers
156 views

I noticed this kinda of event some weeks ago, but I ignored, now it's making me curious. the last element that I add always end up in the up position of the screen, no matter how much I try to alter ...
Vini's user avatar
  • 9
0 votes
1 answer
127 views

I have a JTextArea called premiseText. It is initialized with a default value and is setEditable(false). When I want User to change that value, I have a JButton called editPremise that, in that button'...
Shawn's user avatar
  • 1
1 vote
1 answer
120 views

Our JTree subtype automatically scrolls to its selected node. It's implemented essentially as follows: @Override public void setSelectionPath(TreePath path) { ...
0 votes
0 answers
112 views

I have two monitors with different resolutions. I would like for a JFrame to dynamically resize when dragged to a different monitor. When dragging to a new frame, the label will update, but the frame ...
Advice
3 votes
3 replies
77 views

Below you find the example code for an InputVerifier from the swing tutorial, slightly modified to compile error-free under java 25. The code creates an InputVerifer (class MyVerifier), which is set ...
Jörg's user avatar
  • 341
0 votes
2 answers
160 views

Context: I'm trying to make an app with java swing, however when trying to add a background to the Login Page, the image does not show up. It is there and moves other JComponents when adding a layout ...
0 votes
1 answer
106 views

Can you intercept JToggleButton clicks, making the selected property change conditional? If you add ItemListener or ActionListener, you can't veto the change, it's already happened. Switching the ...
0 votes
1 answer
61 views

I have a non-editable JFormattedTextField. It's enabled. Once the user focuses the field (by clicking it or traversing focus with Tab), the caret is repositioned. While the caret is invisible, it ...
16 votes
1 answer
349 views

The problem started appearing after upgrading from Java 21 to 25. With Java 21, my menus looked like this : With Java 25, a gutter started appearing : I've created minimal portable example to ...
Sybuser's user avatar
  • 1,864
0 votes
1 answer
101 views

JFormattedTextField, surprisingly, does not automatically update the field text content upon value commit — unless I refocus the component (focus something else and then click the field again). One ...

15 30 50 per page
1
2 3 4 5
...
5424

AltStyle によって変換されたページ (->オリジナル) /