Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #2936
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!news.glorb.com!news-out.readnews.com!news-xxxfer.readnews.com!news-out.news.tds.net!newsreading01.news.tds.net!86597e80!not-for-mail |
|---|---|
| From | "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> |
| Subject | Re: Setting z-index in Sw |
| Message-ID | <7d66a1baeb133@uwe> (permalink) |
| X-Comment-To | comp.lang.java.gui |
| Newsgroups | comp.lang.java.gui |
| In-Reply-To | <e77478f3-abc6-4b99-b895-ca4dcebc3e45@d21g2000prf.googlegroups.com> |
| References | <e77478f3-abc6-4b99-b895-ca4dcebc3e45@d21g2000prf.googlegroups.com> |
| Content-Type | text/plain; charset=IBM437 |
| Content-Transfer-Encoding | 8bit |
| X-Gateway | time.synchro.net [Synchronet 3.15a-Win32 NewsLink 1.92] |
| Lines | 68 |
| Date | Wed, 27 Apr 2011 15:41:59 GMT |
| NNTP-Posting-Host | 96.60.20.240 |
| X-Complaints-To | news@tds.net |
| X-Trace | newsreading01.news.tds.net 1303918919 96.60.20.240 (Wed, 27 Apr 2011 10:41:59 CDT) |
| NNTP-Posting-Date | Wed, 27 Apr 2011 10:41:59 CDT |
| Organization | TDS.net |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.java.gui:2936 |
Show key headers only | View raw
To: comp.lang.java.gui Mohammad Javad Dousti wrote: >> .. >> >[quoted text clipped - 32 lines] Please learn how to post in-line with trimming. .. (Why AbsoluteLayout?) >Because no other layout can do my work. Rot. Whatever cannot be done in any single layout is pretty simple to achieve with nested layouts. >..I want to design a board game: >put the places as JButton .. JButtons do not make sense for the game place squares themselves, though perhaps as a D'n'D (Drag'n'Drop, as opposed to Dungeons and Dragons) DropTarget - probably implemented on a (custom) BoardPlacePanel that has a custom background, and is itself contained in a larger layout.* >..and the player as another JButton and put it >on the places. But the arrangement of places is very specific! *All* Java Layouts are very specific, and are also very adaptive to the size and shape of the underlying components. Lock down the size of the underlying components, and the overall layout and size can also be locked. >..(Take a >look at http://en.wikipedia.org/wiki/Monopoly_(game)) Monopoly, ..yes I'm familiar with it. Please enclose URLs in <>, to help prevent line wrap and incorrect parsing. .look at <http://en.wikipedia.org/wiki/Monopoly_(game)>) * Use a GridLayout for each of the four sides, around the borders of a BorderLayout. Drop a GridBagLayout in the CENTER for the game cards, dice etc. D'n'D should be able to handle the rest. You might be able to do the entire GUI in a GBL, here is a Periodic Table implemented in a* GBL. <http://physci.org/jnlp/PToE.jnlp> * Though their are some other layouts, and HTML formatting, thrown in for good measure. >As I said, the component doesn't know its X and Y (So we can't use >getX and getY) I find that hard to believe. What results when you call ? .. System.out.println( myGamePieceJButton.getX() ); -- Andrew Thompson http://www.physci.org/ Message posted via http://www.javakb.com --- * 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 | Next in thread | Find similar | Unroll thread
Setting z-index in Swing "Mohammad Javad Dousti" <mohammad.javad.dousti@THRWHITE.remove-dii-this> - 2011-04-27 15:41 +0000
Re: Setting z-index in Sw "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:41 +0000
Re: Setting z-index in Sw "Mohammad Javad Dousti" <mohammad.javad.dousti@THRWHITE.remove-dii-this> - 2011-04-27 15:41 +0000
Re: Setting z-index in Sw "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:41 +0000
Re: Setting z-index in Sw "Chase Preuninger" <chase.preuninger@THRWHITE.remove-dii-this> - 2011-04-27 15:42 +0000
csiph-web