Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2011
    Posts
    62
    Rep Power
    0

    Default Swing GUI for preferences

    Hello,
    which kind of Swing component is most appropriate to work with the Java preferences API? I would choose JOptionPane but I don't know if that is the best solution.

  2. #2
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,429
    Rep Power
    7

    Default Re: Swing GUI for preferences

    What exactly are you trying to do? Your question doesn't make sense without any context.
    Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
    The Ubiquitous Newbie Tips

  3. #3
    Join Date
    Aug 2011
    Posts
    62
    Rep Power
    0

    Default Re: Swing GUI for preferences

    I just want to store some user settings/preferences (e.g. in Eclipse: Window -> Preferences).

  4. #4
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,429
    Rep Power
    7

    Default Re: Swing GUI for preferences

    If you want plain text you can use a JTextArea. If you want key value pairs you can use a JTable.
    Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
    The Ubiquitous Newbie Tips

  5. #5
    Join Date
    Aug 2011
    Posts
    62
    Rep Power
    0

    Default Re: Swing GUI for preferences

    Thanks for your answer. Which Swing component would be appropriate for the preferences window itself? The interaction components like buttons, sliders etc. are quite easy to understand, but nested windows confuse me.

  6. #6
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,429
    Rep Power
    7

    Default Re: Swing GUI for preferences

    You don't need nested windows. Use a JPanel, decide which LayoutManager(s) to use and add the components you need. Do yourself a favor and read this:
    Lesson: Using Swing Components (The Java™ Tutorials > Creating a GUI With JFC/Swing)
    Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
    The Ubiquitous Newbie Tips

Similar Threads

  1. Storing preferences
    By kiloran in forum New To Java
    Replies: 3
    Last Post: 01-10-2013, 03:51 PM
  2. Shared Preferences
    By johnsonjp34 in forum Android
    Replies: 0
    Last Post: 12-29-2012, 08:23 PM
  3. Failure of Preferences API under OSX
    By JerryAgin in forum Advanced Java
    Replies: 2
    Last Post: 02-29-2012, 11:20 AM
  4. java.util.Preferences
    By jon80 in forum New To Java
    Replies: 0
    Last Post: 06-07-2009, 12:28 AM
  5. scripting preferences import
    By MikeW in forum Eclipse
    Replies: 2
    Last Post: 07-18-2008, 04:18 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •