Pat Hays

Ranch Hand
+ Follow
since Aug 20, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Pat Hays

Hello Marzo

I can recommend a program called JFrameBuilder. I found it very useful it design my interfaces and then it generates the code for various Swing Components.

It shows the effect of setting each property of various Swing Components, just by the current changes. Then you will can the code immediately. Not like others I've found which hide it away. for example, If you want to know how to show an image on your interface, or how to use JTabbedPane properly etc. anyway I think its worth a look.
19 years ago
Hello Jeff

Try to use setPreferredSize(), setMaximumSize() or setMinimumSize() insteaded of setSize(), It will work as long as you are using a layout manager for the parent panel.
19 years ago
Hello Colin

See this example code:
UsingGridLayout.java
19 years ago
Hello Tom

Try the following code instead.
---------------
Toolkit kit = Toolkit.getDefaultToolkit();
Dimension screenSize = kit.getScreenSize();
int screenHeight = screenSize.height;
int screenWidth = screenSize.width;

this.setSize(screenWidth, screenHeight);
19 years ago
Btw, I could recommend you to use JFrameBuilder to try that. Quickly to see what's going on, and Quickly to get the GUI code generated for you.
19 years ago
Hi Cathy

You may add a label in the first and a JPanel in the second column. The JPanel will resize to cover the enter cell. Then you add a button into that JPanel, and set the size of the button by setPreferredSize.
19 years ago
Hi Maha

Try JFrameBuilder which generates human readable GUI code.
19 years ago
Hi Dave

I have not been using JDateChooser. Could you tell me where to get JDateChooser? Thanks in advance.
19 years ago
Try

--------
jTextField1.setEditable(true);
19 years ago
Hi mihir

Using HTML instead of plain text in JTextPane
19 years ago
Hi nabi

You could try to call the following code, after click on the button of panel2. Hope it works.

---------------
panel3.revalidate()
or
panel3.repaint()
or
thelabel.repaint()
19 years ago
Hi Tom

Set the preferred size of the component which is added into the JSplitPane instead. It must work.
19 years ago
The 2nd method is better and clearer.
19 years ago
Hi nabi


.... but when Iframe i minimized and i clich button of panel2
the label not apear in the panel3....



Sorry, I have not understand your problem yet. panel2 is in Iframe, but how can you click button of panel2 when Iframe is minimized ?
19 years ago
Hello Maha

Try this code.
-------------
this.setSize(new Dimension(390, 300));
this.setResizable(false);
19 years ago