Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #3840
| From | "Daniele Futtorovic" <daniele.futtorovic@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: Is there a limit to t |
| Message-ID | <g6nfsf$ipt$1@registered.motzarella.org> (permalink) |
| Newsgroups | comp.lang.java.gui |
| References | <892b0896-d554-43c0-a078-3a73cb53ce2e@m36g2000hse.googlegroups.com> |
| Date | 2011-04-27 15:47 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui,comp.l On 29/07/2008 14:36, Paul.Lee.1971@gmail.com allegedly wrote: > Hi, > I'm trying to write an applet that consists of a JPanel, surrounded by > arrow buttons, and, off to the side, are controls to start/stop/pause > a series of data that will display on the JPanel. The user can zoom > in, or manipulate the panel to show selected areas. All well and good > so far. > > My JPanel's paintComponent method draws a few items: lines of latitude > and longitude, and relevant text (42 N, 40 N etc.), and also a > rectangle when the user drags an area on the screen (which will be > zoomed in). It all worked fine, although many elements, such as the > threading when start/stop/pause are pressed, are not yet implemented. > > However, when I add another algorithm to paintComponent, only the "up" > button and some textfields are drawn, and nothing else. The algorithm > sifts through an ArrayList, and for each item, determines the type of > data held in the list item, so that the correct shape and colour can > be drawn to the JPanel. At present, all that exists is the mechanism > to loop through the List, and a couple of "if...else" statements and a > bit of code to set a colour. This is nothing complicated, but when I > put the algorithm into the code, most of the Swing components aren't > drawn on screen. Has anyone else had this problem? No idea what you're talking about. You ought to explain in much greater depth, especially how your concept is modelled and translated into code. ASCII art might help. I highly doubt your problem is due to a hypothetical "limit to the size or complexity of JPanel's paintComponent method". -- DF. --- * 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 — Previous in thread | Find similar | Unroll thread
Is there a limit to the s Paul.Lee.1971@gmail.com.remove-dii-this - 2011-04-27 15:47 +0000 Re: Is there a limit to t "Daniele Futtorovic" <daniele.futtorovic@THRWHITE.remove-dii-this> - 2011-04-27 15:47 +0000
csiph-web