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 4 of 4

Thread: Inserting scroll lists and text fields into tabbed panes

  1. #1
    Junior Member
    Join Date
    Dec 2011
    Location
    The Universe
    Posts
    10
    My Mood
    Where
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question Inserting scroll lists and text fields into tabbed panes

    Hey, I was wondering what the easiest organization would be for placing separate scrolling lists and editable text fields into a tabbed pane.

    I am creating a multiple conversion program (what I call multiConverter), which is supposed to convert one unit to another. I plan on having the input and output scrolling lists side-by-side respectively and the input and output numbers stacked. The input is editable, the output is not. I plan on using many methods of conversion and for simplicity's sake, I will create tabs for each conversion method (area, length, temperature, data storage, etc.).

    I need some help with the code's organization. Any other ideas would be appreciated as well to benefit the project.


  2. #2
    Member snowguy13's Avatar
    Join Date
    Nov 2011
    Location
    In Hyrule enjoying a chat with Demise and Ganondorf
    Posts
    339
    My Mood
    Happy
    Thanks
    31
    Thanked 48 Times in 42 Posts

    Default Re: Inserting scroll lists and text fields into tabbed panes

    Well, hello person I've never met before. Wink wink. ;D

    I believe you'll find this tutorial helpful. Basically, all I can say is that you should add the Components to a JPanel just as you would with any other JPanel, then tell the Tabbed Pane to use that panel as a tab. It looks relatively easy.

    As for your project that I've never heard you mention before--wink, wink--my suggestion stays the same as before: use a multi-dimensional array or a class that has conversion constants and such, then have your main program call upon this array or class whenever necessary. There are probably better ways, too...

    Good luck on your converter!
    Use highlight tags to help others help you!

    [highlight=Java]Your prettily formatted code goes here[/highlight]

    Using these tags makes your code formatted, and helps everyone answer your questions more easily!




    Wanna hear something funny?

    Me too.

  3. #3
    Junior Member
    Join Date
    Dec 2011
    Location
    The Universe
    Posts
    10
    My Mood
    Where
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Inserting scroll lists and text fields into tabbed panes

    @"snowguy13" lol
    I have already used the tutorial you have provided. I am trying to derive the organization of the code instead of the code itself (i.e. get the GUI initialized, place the tabs into the window, place the separate lists and text fields into their respective tabs.

    Would this call for a "switch" function or multiple if-then statement?

  4. #4
    Junior Member
    Join Date
    Dec 2011
    Location
    The Universe
    Posts
    10
    My Mood
    Where
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Inserting scroll lists and text fields into tabbed panes

    Thank you for telling me that the switch function would not be the easiest organization for my converter.

Similar Threads

  1. Problem parsing WHOIS date from text and capturing fields
    By jdev28 in forum Java Theory & Questions
    Replies: 5
    Last Post: July 16th, 2011, 03:27 PM
  2. Reusing Panel code in each tabs on a tabbed pane
    By kurt-hardy in forum Object Oriented Programming
    Replies: 4
    Last Post: March 23rd, 2011, 08:21 AM
  3. Get dynamic Text fields values
    By John kee in forum What's Wrong With My Code?
    Replies: 2
    Last Post: February 24th, 2011, 07:15 AM
  4. repeat creation of text fields
    By kurt-hardy in forum AWT / Java Swing
    Replies: 1
    Last Post: December 6th, 2010, 12:05 PM
  5. Putting text fields in an array
    By Movies32 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: March 10th, 2010, 07:46 PM

Tags for this Thread