Results 1 to 1 of 1
- 08-10-2011, 10:01 PM #1Member
- Join Date
- Jan 2011
- Rep Power
JList, JMenus and CardLayout panels disappear when I use CellListRenderer
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.
Last edited by eLancaster; 08-10-2011 at 10:10 PM.
- By kakefjes in forum AWT / SwingReplies: 0Last Post: 03-17-2011, 11:36 AM
- By ecliptical in forum New To JavaReplies: 4Last Post: 01-25-2010, 12:41 AM
- By gan5016 in forum Java 2DReplies: 7Last Post: 09-26-2009, 02:58 AM
- By diab01ical in forum New To JavaReplies: 2Last Post: 06-04-2008, 02:48 AM
- By dubdubdub in forum New To JavaReplies: 3Last Post: 12-29-2007, 05:07 PM