Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums

Go Back   Code Forums > Application and Web Development > Java

Reply
 
LinkBack Thread Tools Display Modes
Old 03-22-2005, 02:42 AM   #1 (permalink)
1fast6
Registered User
 
Join Date: Mar 2005
Posts: 1
1fast6 is on a distinguished road
problem with adding/removing JPanels.Help!

Hi All,

Just started learning java GUI but am having a few issues.
I want to be able to add and remove components to my JPanels but each time i try and invoke remove() or removeAll i get a null pointer exception. I don't understand why because i made the jpanels global.

Infact the only function that works is getContentPane().removeAll().
but i dont want to have to add all the panels all over again just to display it slightly differently.

Another issue i have is i cannot call functions from my jpanels within nested methods. the compiler says " local variable ... is being accessed from within inner class must be declared final".
However i don't want to declare it final!

i am really stuck and i cant do anymore work until i sort this out.

Thanks for any help i'd really appriciate it
1fast6 is offline   Reply With Quote
Old 05-17-2005, 01:11 AM   #2 (permalink)
Albeeezz
Registered User
 
Join Date: May 2005
Posts: 5
Albeeezz is on a distinguished road
If you posted some commented code, maybe i could help
Albeeezz is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hashing problem jodders Standard C, C++ 1 02-09-2005 01:51 PM
Problem Assignment (Urgent help req.) Boltress Standard C, C++ 0 01-12-2005 07:59 AM
looping problem maria_arif MS Technologies ( ASP, VB, C#, .NET ) 1 11-29-2004 08:07 AM
Help debugging a power problem Belisarius Lounge 0 10-25-2003 04:44 PM
This is a windows/C problem UnderWing Standard C, C++ 6 03-28-2003 06:17 AM


All times are GMT -8. The time now is 02:28 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting