Article View: borland.public.jbuilder.java.swing
Article #13155Re: display problem of JInternalFrame
From: Wu, Weimin
Date: Mon, 14 Sep 1998 00:00
Date: Mon, 14 Sep 1998 00:00
75 lines
3226 bytes
3226 bytes
When I added the JInternalFrame to the applet, I set the "closable" property to true. After reading your message, I checked the
source code, i didnot find "setClosable(true)". So I added code like jInternalFrame1.setClosable(true). It does not work
either. There is no error message.
Then I added some codes to show if it is closable using the isClosable() method. The method returns true. Just con't close it.
Any idea?
wu
Michael A. Long wrote:
> I belive you will have to use the JInternalFrame's accessor
> setClosable(boolean)
> to true in order for it to be closable.
>
> There is also a isClosable() that returns a boolean to tell you the current state of the JInternalFrame's closable state.
>
> Wu, Weimin wrote in message <35F99C64.ED7F67D5@784.hypermart.com>...
> >Michael,
> >
> >Thanks for your answer. I quess you are right, I should use JDesktopPane, but it seems that is not all.
> >
> >I add a JDesktopPane and add JInternalFrame to the JDesktopPane. Now the frame can be resized, but it CANNOT be closed.
> >
> >I am not sure if it needs more than JDesktopPane. Anyway, thanks for your answer again.
> >
> >wu
> >
> >
> >
> >Michael A. Long wrote:
> >
> >> I just started playing with this so take this answer with several grains of salt. I believe you have to, or should, use
> >> JDesktopPane as a container for JInternaFrame.
> >>
> >> This is one area where the help file (suprisingly) has some pretty good info. Just look up JDesktopPane.
> >>
> >> Wu, Weimin wrote in message <35F6C23F.C5965536@784.hypermart.com>...
> >> >Hi,
> >> >
> >> >I am trying to use a JInternalFrame in an applet that extends JApplet. I
> >> >am using JBuilder c/s.
> >> >
> >> >I created a JInternalFrame
> >> >
> >> > JInternalFrame jInternalFrame_login = new
> >> >JInternalFrame("test",true,true,true,true);
> >> >
> >> >and add it to a JPanel, which is added to this. No code is added
> >> >manually ( except extending of JApplet).
> >> >
> >> >
> >> >Then I test it in AppletViewer. The frame is displayed there and looks
> >> >fine. But when I click the icon on the top of the frame, the frame
> >> >doesnt response. It cannot be maximumized and closed. It can be
> >> >"iconized", disappeared, I have to resize the AppletViewer pane to find
> >> >the iconized frame.
> >> >
> >> >The error message is, java.lang.NullPointerException.
> >> >
> >> >Is there anybody could help me with this problem? Thanks.
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >wu
> >> >
> >
Technical Details
Message-ID:
<35FD582B.33EBB53D@784.hypermart.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<35F6C23F.C5965536@784.hypermart.com> <6tasut$drb10@forums.borland.com> <35F99C64.ED7F67D5@784.hypermart.com> <6thvj7$mne6@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,98c9f1b915d4464f X-Google-Attributes: gid111d45,public From: "Wu, Weimin" <webmaster@784.hypermart.com> Subject: Re: display problem of JInternalFrame Date: 1998/09/14 Message-ID: <35FD582B.33EBB53D@784.hypermart.com> X-Deja-AN: 391024107 Content-Transfer-Encoding: 7bit References: <35F6C23F.C5965536@784.hypermart.com> <6tasut$drb10@forums.borland.com> <35F99C64.ED7F67D5@784.hypermart.com> <6thvj7$mne6@forums.borland.com> Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing