Results 1 to 4 of 4
  1. #1
    Join Date
    May 2013
    Posts
    2
    Rep Power
    0

    Default Alternative to method setActive()

    I'm designing a product very similar to a windows help application: table of content on the left and main content on the right. Every time I load a topic in the main frame I'd like to highlight the element in the table of content. I've heard there was a method called setActive() in order to partially achieve what I'm talking about but it seems it no longer exists. I'm wondering what would be the best alternative. In other words what I'm after is some kind of function which doesn't allow more than one item per time to be highlighted.
    Thanks in advance for your help!

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default Re: Alternative to method setActive()

    What is the class used for the table of contents?
    That'll at least give you an idea of where to look.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

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

    Default Re: Alternative to method setActive()

    I don't know if this helps but Java has its own help system (Google can tell where to download it from); the help system can use its own primary window or use a simple JPanel for its display; it has a TOC (Table Of Contents) on the left and a content pane on the right; the content is html based and clicking on a hyper link selects the corresponding entry in the TOC as well; Sun was showing off a bit: the help text for that system is written in that system itself. It also has context sensitive help, a very nice non-intrusive feature.

    ind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  4. #4
    Join Date
    May 2013
    Posts
    2
    Rep Power
    0

    Default Re: Alternative to method setActive()

    Thanks guys for your answers. Actually I've partially achieved my goal in this way:

    The body of each element loading in the main frame has got an onload=highlight(). The function highlight changes the background of the corresponding element in the TOC. However, now I need to change the background color back to "none" when I change the element loaded in the main frame.... any suggestion?

    Jos, thanks for your help but I can't use Java's help system.

    UPDATE

    It should be something like onblur but I don't know how to use it
    Last edited by michele.imperiali; 05-04-2013 at 11:43 PM.

Similar Threads

  1. Better alternative for ArrayList
    By saiganesh44 in forum New To Java
    Replies: 2
    Last Post: 04-24-2012, 06:49 PM
  2. Which would be the most effecient alternative?
    By Krystah in forum New To Java
    Replies: 3
    Last Post: 04-18-2011, 11:56 PM
  3. Is there an alternative to OBEX?
    By danielpereira in forum Advanced Java
    Replies: 0
    Last Post: 10-18-2010, 12:36 AM
  4. Is EJB an alternative for JDBC?
    By makpandian in forum Enterprise JavaBeans (EJB)
    Replies: 4
    Last Post: 01-06-2010, 10:14 AM
  5. Any Alternative to Swing?
    By Niveditha in forum AWT / Swing
    Replies: 13
    Last Post: 06-27-2008, 10:39 AM

Posting Permissions

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