Results 1 to 1 of 1
  1. #1
    eLancaster is offline Member
    Join Date
    Jan 2011
    Posts
    93
    Rep Power
    0

    Default JList, JMenus and CardLayout panels disappear when I use CellListRenderer

    Hi Guys,

    I'm writing a Contact Book in Java. It consists of a search field at the top, with a add contact button next to it. When you click on the add button, you're taken to the add contacts panel. When you click on the search field, you're taken to the panel that contains the JList of all the components.
    The project is still in it's early stages and there's plenty to be done. I'm just working on the UI at the moment.

    When i just use a plain jlist, everything works fine but i want a customized cells in the JList so I used a CellListRenderer. I set the renderer to the JList, and when i run the program now, the JMenu items, the JList, and the addcontact panel all disappear. I don't what's causing it.

    The code is kind of long, so i've attached it so that you guys can compile it. It would look messy here.
    I'd really appreciate your help.

    P.S. When you launch the application, you see an empty grey window. You have to resize the window before you see the UI elements. That's another problem which I haven't figured out.

    Thanks
    Attached Files Attached Files
    Last edited by eLancaster; 08-10-2011 at 11:10 PM.

Similar Threads

  1. Need some help with panels inside panels
    By kakefjes in forum AWT / Swing
    Replies: 0
    Last Post: 03-17-2011, 12:36 PM
  2. JButton doesn't disappear when it is supposed to?
    By ecliptical in forum New To Java
    Replies: 4
    Last Post: 01-25-2010, 01:41 AM
  3. Drawing disappear!!!!
    By gan5016 in forum Java 2D
    Replies: 7
    Last Post: 09-26-2009, 03:58 AM
  4. How to make a JButton disappear?
    By diab01ical in forum New To Java
    Replies: 2
    Last Post: 06-04-2008, 03:48 AM
  5. results to code disappear too fast for DOS window
    By dubdubdub in forum New To Java
    Replies: 3
    Last Post: 12-29-2007, 06:07 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
  •