Article View: borland.public.jbuilder.java.api
Article #2796Frame -> Panel Problem
From: Jochen Vastmans
Date: Mon, 10 Apr 2000 00:00
Date: Mon, 10 Apr 2000 00:00
30 lines
1631 bytes
1631 bytes
Hello,
I have some problems with panels in a frame.
This is what I want to do...
In a Frame I have 2 panels. In the first panel
are four buttons. What I want to do is, when you
click one of the four buttons, some components are
added to the second panel.
What I tried is, I just added a component in the
second panel, but that doesn't update the whole thing
(nothing happens), I tried to put the following lines
which are set in the Frame-constructor in a method,
and by adding components just call that method.
But still it doesn't do anything
protected void method(){
setLayout(new BorderLayout());
add(panel1,BorderLayout.NORTH);
add(panel2,BorderLayout.CENTER);
}
Can someone give me a solution?
Best Regards,
Jochen Vastmans
e-mail: jochen.vastmans@student.kuleuven.ac.be
Technical Details
Message-ID:
<955383546.718837@marvin>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,28ed0cb65287a8a,start X-Google-Attributes: gid1089d0,public From: "Jochen Vastmans" <jochen.vastmans@student.kuleuven.ac.be> Subject: Frame -> Panel Problem Date: 2000/04/10 Message-ID: <955383546.718837@marvin> X-Deja-AN: 609153616 Cache-Post-Path: marvin!unknown@du03-05.dial.kulnet.kuleuven.ac.be Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=iso-8859-1 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 X-Complaints-To: abuse@belnet.be X-Trace: naxos.belnet.be 955383546 10014 134.58.127.3 (10 Apr 2000 16:19:06 GMT) Organization: KULeuven X-Cache: nntpcache 2.3.3 (see http://www.nntpcache.org/) Mime-Version: 1.0 NNTP-Posting-Date: 10 Apr 2000 16:19:06 GMT Newsgroups: borland.public.jbuilder.java.api