Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #306
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!news.alt.net!news-in-01.newsfeed.easynews.com!easynews.com!easynews!news-out.news.tds.net!newsreading01.news.tds.net!86597e80!not-for-mail |
|---|---|
| From | "Daniel Dyer" <daniel.dyer@THRWHITE.remove-dii-this> |
| Subject | Re: Drawing on Tabs |
| Message-ID | <op.tjyebjff8kxvgr@jack.local> (permalink) |
| X-Comment-To | comp.lang.java.help,comp. |
| Newsgroups | comp.lang.java.gui |
| In-Reply-To | <iFlch.17722$9v5.15668@newssvr29.news.prodigy.net> |
| References | <iFlch.17722$9v5.15668@newssvr29.news.prodigy.net> |
| Content-Type | text/plain; charset=IBM437 |
| Content-Transfer-Encoding | 8bit |
| X-Gateway | time.synchro.net [Synchronet 3.15a-Win32 NewsLink 1.92] |
| Lines | 42 |
| Date | Wed, 27 Apr 2011 15:26:46 GMT |
| NNTP-Posting-Host | 96.60.20.240 |
| X-Complaints-To | news@tds.net |
| X-Trace | newsreading01.news.tds.net 1303918006 96.60.20.240 (Wed, 27 Apr 2011 10:26:46 CDT) |
| NNTP-Posting-Date | Wed, 27 Apr 2011 10:26:46 CDT |
| Organization | TDS.net |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.java.gui:306 |
Show key headers only | View raw
To: comp.lang.java.help,comp. On Sat, 02 Dec 2006 20:49:18 -0000, SkippyBoy <skippyboy2005+NOSPAM@gmail.com> wrote: > Hi all - I have an application where my main frame has a tabbed > interface, > and each tab has a JPanel. > > I would like to draw a line graph on the second tab (the first tab is > where > data is entered) and a bar graph on the second tab. > > The problem I have is how to draw on the second or 3rd tabs. > > I googled and one solution was to subclass the JPanel and then override > the > paintComponent() method. I tried but it doesn't seem to work. I am > probably > just doing it wrong. > > How would I go about defining/extending the JPanel class? or is there > some > other container that would serve this purpose better? > > Any help is appreciated. Sub-classing JComponent directly is probably more appropriate. Even easier is using a ready-made library such as JFreechart. You might get better advice from comp.lang.java.gui (this reply is cross-posted with follow-ups set to comp.lang.java.gui only). Dan. -- Daniel Dyer http://www.uncommons.org --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
Back to comp.lang.java.gui | Previous | Next | Find similar
Re: Drawing on Tabs "Daniel Dyer" <daniel.dyer@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
csiph-web