Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Null Pointer Exception when updating JFrame containing JTabbedPane

b1b477e7-a887-4458-94ba-d88e1d57fda3Dec 31 2014 — edited Dec 31 2014

In creating a GUI, I needed to use a JTabbedPane stored inside of a JFrame.  I also needed to update the JTabbedPane tabs, but wasn't sure how to do this.

I am new to programming using java graphics, so I first tried using method SwingUtilities.updateComponentTreeUI() to update the JFrame as a whole.  This worked to update the window appropriately, but threw a NullPointerException.  The program still continued to run.

Does anybody know why this is happening?  I will include my code if needed, but I wasn't sure if this is an error that will always occur when trying to update a JFrame containing a JTabbedPane or if it actually may have something to do with the code I have written.

Thanks!

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 28 2015
Added on Dec 31 2014
0 comments
680 views