Results 1 to 7 of 7
  1. #1
    Kagiso is offline Member
    Join Date
    Nov 2012
    Location
    Johannesburg, South Africa
    Posts
    92
    Rep Power
    0

    Default Is it possible to set text directly on a content pane

    I'm supposed to put String[] values on a content pane, how do i do it?

  2. #2
    eRaaaa is offline Senior Member
    Join Date
    Oct 2010
    Location
    Germany
    Posts
    787
    Rep Power
    5

    Default Re: Is it possible to set text directly on a content pane

    What exactly do you mean with "text directly on a content pane" ?

  3. #3
    Kagiso is offline Member
    Join Date
    Nov 2012
    Location
    Johannesburg, South Africa
    Posts
    92
    Rep Power
    0

    Default Re: Is it possible to set text directly on a content pane

    I am required to create a swing program which displays string values on a content pane..... please help.... I've been stuck for several hours now

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,755
    Rep Power
    19

    Default Re: Is it possible to set text directly on a content pane

    As labels?
    As a drop down list?
    As something else?

    In other words, your requirements are incredibly vague.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  5. #5
    Kagiso is offline Member
    Join Date
    Nov 2012
    Location
    Johannesburg, South Africa
    Posts
    92
    Rep Power
    0

    Default Re: Is it possible to set text directly on a content pane

    I think it's better if I write down the whole question, it goes like this:

    write a swing program that declares an empty array of grades with a maximum length of 50.
    Implement a JOptionPane input box within a while loop to allow the user to enter grades using a -1 as a sentinel.
    after the grades are entered, a content pane should display the grades sorted from lowest to highest.

    I have underlined the part that confuses me, please give suggestions

  6. #6
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,188
    Rep Power
    19

    Default Re: Is it possible to set text directly on a content pane

    Quote Originally Posted by Kagiso View Post
    a content pane should display the grades
    That's still incredibly vague, so its better you ask your instructor for clarification. Feel free to come back if you have further problems.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  7. #7
    Kagiso is offline Member
    Join Date
    Nov 2012
    Location
    Johannesburg, South Africa
    Posts
    92
    Rep Power
    0

    Default Re: Is it possible to set text directly on a content pane

    Thanks for the help.... he said I'm supposed to write those values in a textPane. And said we should use a Document class to do so

Similar Threads

  1. Content pane vs. JPanel?
    By Bestsanchez in forum AWT / Swing
    Replies: 1
    Last Post: 04-22-2012, 07:26 AM
  2. Can't change the background of my content pane
    By jiffi in forum AWT / Swing
    Replies: 29
    Last Post: 12-11-2011, 05:04 PM
  3. adding multiple jpanels to content pane
    By tooktook22 in forum AWT / Swing
    Replies: 2
    Last Post: 01-19-2011, 06:40 PM
  4. Centering things a content pane
    By RKhadder in forum New To Java
    Replies: 1
    Last Post: 09-28-2010, 01:43 AM
  5. Changing content pane of a JFrame?
    By dunafrothint in forum AWT / Swing
    Replies: 1
    Last Post: 03-11-2010, 10:21 PM

Posting Permissions

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