I am using swing to create my GUI. J have a JFrame containing one main JPanel which, in its turn contain several JPanels which, in their turn, contain buttons.
After some advice on using jpanel - I\'m new to java and playing around with the GUI elements. Bascially what I\'m curious about is if I can set up a Jpanel开发者_Python百科 in one class, then someho
I have a JList inside a Scrollpane.If you click on the list and move the arrow keys up and down it works like you expect, you can move your selection index and display around just fine.
Here is the code: import javax.swing.SwingUtilities; import javax.swing.JFrame; import javax.swing.JPanel;
I\'m looking for a good way to disable a JPanel.I\'m using a MVC design for a Java Swing GUI.I want the JPanel to be disabled while the model is processin开发者_运维问答g stuff.I\'ve tried setEnabled(
I would like to remove an old JPanel from the Window (JFrame) and add a new one. How should I do it?
I have a frame with 4 JPanels and 1 JScrollPane, the 4 panels are in border layout north, east, south, west and the scrollpane in the center.
I\'m extending JPanel to make a custom drawing panel, but am getting a NullPointerException and can\'t work out why. I\'ve removed 开发者_JS百科code until it\'s pretty bare, but the error is still occ
I have a JFrame with two JPanels inside. One is set on west, other on east with BorderLayout. The thing is, it just shows two 10 pixel width, 100% JFrame height strips:
I\'m drawing shapes inside this JPanel, which is also inside another main JPanel. At repaint() it only draws the shapes for one millisecond and then they disappear. They don\'t stay painted, why?