Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Java program to work with frame and JFileChooser preferences

  1. #1
    Junior Member
    Join Date
    Mar 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Java program to work with frame and JFileChooser preferences

    The normal window in the GUI i'm working on, works fine. When i bring up a new NetFrame (e.g. preferences) the components aren't drawn completely. None of the 3 buttons show up, a few check boxes in a tabbed pane show up (not all of them), etc. When i click where a button should be, it appears. When i switch to the other tab in the pane, its contents appear (except for a small missing bottom right corner of the border for a jtextarea), and when i switch back to the first tab, all of its contents appear. When i resize the panel, everything shows up.
    I've tried calling validate, revalidate, validateTree, repaint, show, pack, none of them do anything (pack rearranges things, but nothing new appears).

    I'm completely out of ideas!

    A previous version of the program works fine, so it is something wrong with my code (i.e. not my computer / packages etc).

    The thing that really stumps me, is that a JFileChooser appears incomplete -- only showing the file browser section, and the okay button (missing cancel button, and borders etc).

    I'm sorry i don't have any sample code to show, there too much to put it all, and i have no idea where the problem is.
    I'd appreciate any help or direction you have. THANKS!


  2. #2
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 294 Times in 227 Posts
    Blog Entries
    4

    Default Re: Missing pieces of components (JFileChooser, JButtons, etc) help?

    Hello jlobe and welcome to the Java Programming Forums.

    Could you please attach a screen shot for me to look at?
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

  3. #3
    Junior Member
    Join Date
    Mar 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Missing pieces of components (JFileChooser, JButtons, etc) help?

    Great idea; gladly!

    Attached are examples of what the prefernces frame and JFileChooser should look like, and do look like.

    Additional info:
    System:
    Running on a MacBook Pro OSX 10.5.6
    Java:
    java version "1.5.0_16"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284)
    Java HotSpot(TM) Client VM (build 1.5.0_16-133, mixed mode, sharing)
    Attached Images Attached Images

Similar Threads

  1. Java error in password generator program
    By Lizard in forum What's Wrong With My Code?
    Replies: 1
    Last Post: May 16th, 2009, 07:49 PM
  2. [SOLVED] Java program to generate 10 random integers and then sum computed
    By Lizard in forum What's Wrong With My Code?
    Replies: 1
    Last Post: May 14th, 2009, 12:33 PM

Tags for this Thread