Article View: borland.public.jbuilder.java.swing
Article #10162JTabbedPane & Other Problems
From: Jason Teagle
Date: Wed, 03 Nov 1999 00:00
Date: Wed, 03 Nov 1999 00:00
49 lines
2943 bytes
2943 bytes
I'm very new to Java, so I apologise if my questions seem a bit stupid. I'm attempting to create a tabbed dialogue. I've got an applet which creates a separate JFrame, which contains a JTabbedPane, which has three JPanes to form the tabs. Each of those JPanes has a JButton on it to give it something to show. When I run the app, the tabbed frame appears quite correctly, but clicking on the other tabs has no effect - the page doesn't change. Also, if I click the button on the visible page, it doesn't depress. Did I miss something? I added a listener to the JTabbedPane and a handler for itemStateChanged, but it never gets called. I added handlers for each page for mouseClicked in the hope that they would fire when the tabs were clicked, but they don't. Should the changeover of pages happen automatically as part of the JTabbedPane class, or am I supposed to do it manually? If so, how? Why is the 'help' on Java classes so pitiful? All they do is repeat the name of the method, they don't explain why you would do it, or give examples, or anything. Also, when I use the deployment wizard to put all the files in a directory, and then I run the HTML file, I'm told that it can't find the metal look and feel thingy. Is this something missing from my VM, or is it something buried in the JBuilder installation that I need to copy somewhere? How come it works in the debug environment? I'm not bothered which look and feel it has at the moment, but I would have expected it to at least work with the one it chose! Finally, my environment (JBuilder2) seems to have decided to breakpoint in a fake file derived from the JFrame class (see below), and I can't stop it from doing that now - I want it to just run to the first breakpoint _I_ set. This is what the text it breaks at looks like (it breaks on the first line, the comment!): // JBuilder API Decompiler STUB SOURCE generated from class file // Wed Nov 03 18:18:36 GMT 1999 // -- implementation of methods is not available Any help would be greatly appreciated. ------------------------------------------------ _ _ Jason Teagle o o < jteagle@geocities.com v http://www.geocities.com/~jteagle/ ------------------------------------------------
Technical Details
Message-ID:
<941653192.27114.0.nnrp-03.c2de87f2@news.demon.co.uk>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,2edf816f020c899f,start X-Google-Attributes: gid111d45,public From: "Jason Teagle" <jteagle@geocities.com> Subject: JTabbedPane & Other Problems Date: 1999/11/03 Message-ID: <941653192.27114.0.nnrp-03.c2de87f2@news.demon.co.uk> X-Deja-AN: 544040495 X-NNTP-Posting-Host: teaglehouse.demon.co.uk:194.222.135.242 X-Trace: news.demon.co.uk 941653192 nnrp-03:27114 NO-IDENT teaglehouse.demon.co.uk:194.222.135.242 X-MSMail-Priority: Normal X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Newsgroups: borland.public.jbuilder.java.swing X-Complaints-To: abuse@demon.net