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

    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
    Rep Power

    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
    Voorschoten, the Netherlands
    Blog Entries
    Rep Power

    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,

    Build a wall around Donald Trump; I'll pay for it.

  4. #4
    Join Date
    May 2013
    Rep Power

    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.


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

Similar Threads

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