Resizing a JPanel inside a JFrame

I am new to Java, started learning swing and have a problem with resizing a JPanel inside a JFrame. I am following this tutorial:

http://vincentramdhanie.blogspot.com/2009/11/cardlayout-with-netbeans.html

because ultimately I am learning each of the different layouts and have come to the CardLayout now. In the above, there is a JPanel being used for a status panel. That is what I want to do as well, but when I drag a JPanel onto my blank JForm it takes up all the space and I don't see any resizing handles for it like I would if I were using a .NET panel. Changing preferredSize in the properties window also does nothing. What am I missing here? I feel like a complete noob for asking such a basic question but I really can't find any way to resize this thing.. :-|

EDIT:

I forgot to mention; I am using NetBeans IDE

Answers


You can't resize the JComponent because you've select CardLayout. The CardLayout can holds/manages one or more components that share the same display space.

What you need to read documentation and good tutorials.


Need Your Help

Will a faster video card improve the performance of the Android emulator?

android performance emulator gpu

This is a general question. I am trying to create apps for Google TV using the 3.1 Honeycomb OS, which is not yet available on Google TV... Only on Android Tablets. I know that using a device is much

Are open streams automatically flushed and closed on SIGINT in C?

c posix signals

I've read in a man page that when exit() is called all streams are flushed and closed automatically. At first I was skeptical as to how this was done and whether it is truly reliable but seeing as I

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.