Results 1 to 8 of 8
Like Tree1Likes
  • 1 Post By JosAH

Thread: jPanel question

  1. #1
    .paul. is offline Member
    Join Date
    Jun 2012
    Posts
    73
    Blog Entries
    1
    Rep Power
    0

    Question jPanel question

    does the jPanel have an equivalent property to the vb panel's tag property?

    thanks for your help

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

  3. #3
    cselic is offline Senior Member
    Join Date
    Apr 2010
    Location
    Belgrade, Serbia
    Posts
    278
    Rep Power
    5

    Default Re: jPanel question

    @.paul:

    You can find list of all JPanel properties here: JPanel (Java 2 Platform SE 5.0)
    Last edited by cselic; 06-29-2012 at 11:12 PM.

  4. #4
    .paul. is offline Member
    Join Date
    Jun 2012
    Posts
    73
    Blog Entries
    1
    Rep Power
    0

    Default Re: jPanel question

    Quote Originally Posted by Fubarable View Post
    Can you describe the tag property for us non-VB programmers?
    it's a non visible object property that can be used to store (+ retrieve) any sort of information

  5. #5
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default Re: jPanel question

    Quote Originally Posted by .paul. View Post
    it's a non visible object property that can be used to store (+ retrieve) any sort of information
    OK, Yes, I remember that when I dabbled in C#. No, I don't think that JPanel or JComponent has that capability, but there are other ways to achieve a similar goal including extension by inheritance or by composition.

  6. #6
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,642
    Rep Power
    7

    Default Re: jPanel question

    Quote Originally Posted by .paul. View Post
    it's a non visible object property that can be used to store (+ retrieve) any sort of information
    JPanel has a Name property, but that is specific for a String. You could extend JPanel, and create getters/setters for a user object of your choice. Or you could key a HashMap with the JPanel, and value it with the object of choice.

  7. #7
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,433
    Blog Entries
    7
    Rep Power
    20

    Default Re: jPanel question

    There's a client property for all JComponents ...

    kind regards,

    Jos
    doWhile likes this.
    cenosillicaphobia: the fear for an empty beer glass

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

    Default Re: jPanel question

    Quote Originally Posted by cselic View Post
    @.paul:

    You can find list of all JPanel properties here: JPanel (Java 2 Platform SE 5.0)
    Please don't post links to API for older Java versions that have already crossed their end-of-life. Bookmark these:
    Java Platform SE 6
    Java Platform SE 7

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

Similar Threads

  1. JPanel question.
    By santa in forum New To Java
    Replies: 4
    Last Post: 02-27-2012, 06:16 PM
  2. Change JPanel text of Parent JPanel from JDialog
    By bikashlama in forum AWT / Swing
    Replies: 7
    Last Post: 12-09-2011, 03:47 AM
  3. Adding a jpanel to a customized Jpanel Class
    By trishtren in forum AWT / Swing
    Replies: 7
    Last Post: 04-05-2011, 06:52 PM
  4. Question about repainting a JPanel
    By Nosrettap in forum Advanced Java
    Replies: 5
    Last Post: 01-02-2011, 08:29 PM
  5. Need help with array list jpanel question!!! Plz help!!!
    By helpmeplease in forum New To Java
    Replies: 17
    Last Post: 12-11-2009, 12:37 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
  •