Re: Problem with resizing
The87Boy wrote:
I thought it was self-explained about the main-method as it just
creates the JFrame like:
public static void main(String[] ar) {
new Tab1();
}
No, that is not self-explanatory. For one thing, one might have assumed you
new not to create GUI components other than on the Event Dispatch Thread(EDT),
but one would have been wrong. You should only do Swing GUI work on the EDT
or else you risk very bizarre bugs.
John mentioned this. Good respondents like him put mentions like that in
their posts for good reasons. You ignore their good advice at peril of missing
something very useful to you.
I also though that imports was not so important, when there are only
one possibility for each import
But I could easily copy-and-paste
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;
Yes, you can easily copy and paste, so easily that it's worthwhile to copy and
paste entire examples and not prejudge what's relevant. After all, the extra
effort is negligible and could mean the difference between a useful answer and
either a less useful answer or none at all.
Did you read the link John provided regarding an SSCCE? Again, he puts good
advice in his post for a reason.
--
Lew