Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #2610

Re: Unpredictable Swing b

Path csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news-in-01.newsfeed.easynews.com!easynews.com!easynews!news-out.news.tds.net!newsreading01.news.tds.net!86597e80!not-for-mail
From "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this>
Subject Re: Unpredictable Swing b
Message-ID <796df14b29651@uwe> (permalink)
X-Comment-To comp.lang.java.gui
Newsgroups comp.lang.java.gui
In-Reply-To <470A95E4.2DCA@operamail.com>
References <470A95E4.2DCA@operamail.com>
Content-Type text/plain; charset=IBM437
Content-Transfer-Encoding 8bit
X-Gateway time.synchro.net [Synchronet 3.15a-Win32 NewsLink 1.92]
Lines 100
Date Wed, 27 Apr 2011 15:40:07 GMT
NNTP-Posting-Host 96.60.20.240
X-Complaints-To news@tds.net
X-Trace newsreading01.news.tds.net 1303918807 96.60.20.240 (Wed, 27 Apr 2011 10:40:07 CDT)
NNTP-Posting-Date Wed, 27 Apr 2011 10:40:07 CDT
Organization TDS.net
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.gui:2610

Show key headers only | View raw


  To: comp.lang.java.gui
H|Nkan Lane wrote:
..
>- The reason why it asks for the user directory at one point is because
>I read files from that directory when testing a feature. It probably
>should not be in the code anymore. 

OK, but if you decide different, note that you can point
a javax.jnlp.FileOpenService to the current directory by
feeding it a path hint of ".".  Using JNLP services for 
things like that, would allow this application to be 
offered in a 'sandboxed' form.

>...Thank you for this observation. 

You are welcome.  I have an interest in looking into
JWS apps. in general, to get a sense for how close 
they come to being fully 'sandbox'able.

>- I have used BorderLayouts for most of the frames. The JEditorPane is
>just called with the constructor and the url of the displayed page as
>the argument. I did not apply a Layoutmanager for that window.

A JWindow?  Please try to be specific*, so we are all
sure we are 'on the same page'.  A quick test** in Java
6 suggests the default layout for JWindow is BorderLayout
as well.  

Without specifying a layout constraint for an added 
Component, the default is BorderLayout.CENTER.

That is the window showing the Uni. site we are 
referring too, right?

* Hey! You know what I was saying about 'specific'?
Now I recheck it I realise that is specifically *not* 
a JWindow - looks like a JFrame, am I right?  OK - 
all the above  is same for JFrame**, but please 
refrain from using generic terms like 'window'.

Now - I still don't think I have quite managed to 
communicate what I am seeing, but since 'a picture
paints a thousand words', I'll give you 'two thousand'..
<http://www.physci.org/test/screenshot/kafka-1-16.png>
<http://www.physci.org/test/screenshot/kafka-2-16.png>

Besides the odd problem of the web page appearing 
and disappearing according to the width of stretched
main JFrame, the JTables of the JFrame could use 
adjusting.  Those JTables could do with stretching 
left to right as the JFrame increases width.  I 
suspect they went into the WEST of one of the 
BorderLayouts?

** Little example
<sscce>
import java.awt.*;
import javax.swing.*;

class DefaultLayoutManager {

  static String[] constraint =
  {
    BorderLayout.NORTH,
    BorderLayout.EAST,
    BorderLayout.WEST,
    BorderLayout.SOUTH,
    BorderLayout.CENTER
  };

  public static void main(String[] args) {
    JFrame root = new JFrame();
    System.out.println( root.getLayout() );

    for (int ii=0; ii<constraint.length; ii++ ) {
      root.add(
        new JButton(constraint[ii]),
        constraint[ii] );
    }

    //check where the component goes, by default
    root.add(new JLabel("Default") );

    root.pack();
    root.setVisible(true);
  }
}
</sscce>

-- 
Andrew Thompson
http://www.athompson.info/andrew/

Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-gui/200710/1

---
 * 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 | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Unpredictable Swing behav "Håkan Lane" <håkan.lane@THRWHITE.remove-dii-this> - 2011-04-27 15:39 +0000
  Re: Unpredictable Swing b "Ian Wilson" <ian.wilson@THRWHITE.remove-dii-this> - 2011-04-27 15:39 +0000
  Re: Unpredictable Swing b "Nigel Wade" <nigel.wade@THRWHITE.remove-dii-this> - 2011-04-27 15:39 +0000
  Re: Unpredictable Swing b "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
  Re: Unpredictable Swing b "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
    Re: Unpredictable Swing b "Håkan Lane" <håkan.lane@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
      Re: Unpredictable Swing b "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
        Re: Unpredictable Swing b "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
          Re: Unpredictable Swing b "Håkan Lane" <håkan.lane@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
            Re: Unpredictable Swing b "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
              Re: Unpredictable Swing b "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000

csiph-web