ERROR - java.awt.IllegalComponentStateException - Possible Causes of IllegalComponentStateException

Exception Thrown By:Cause
ClassMethod
Component public Locale
getLocale()
if the Componentdoes not have its own locale and has not yet been
added toa containment hierarchy such that the locale can be determinedfrom the containing parent
Component public Point
getLocationOnScreen()
if thecomponent is
not showing on the screen
Dialog public void
setUndecorated(boolean undecorated)
if the
dialog is displayable
Frame public void
setUndecorated(boolean undecorated)
if the
frame is displayable
JApplet public void
setContentPane(Container contentPane)
(a runtimeexception) if the
content pane parameter is null
JApplet public JLayeredPane
getLayeredPane()
(a runtimeexception) if the
layered pane parameter is null
JDialog public void
setContentPane(Container contentPane)
(a runtimeexception) if the
content pane parameter is null
JDialog public void
setLayeredPane(JLayeredPane layeredPane)
(a runtimeexception) if the
layered pane parameter is null
JFrame public void
setContentPane(Container contentPane)
(a runtimeexception) if the
content pane parameter is null
JFrame public void
setLayeredPane(JLayeredPane layeredPane)
(a runtimeexception) if the
layered pane parameter is null
JInternalFrame public void
setContentPane(Container c)
(a runtime exception) if
the content pane parameter is null
JRootPane public void
setContentPane(Container content)
(a runtimeexception) if the content pane parameter is nullget
the container that holds the components parented by the root pane
JRootPane public void
setLayeredPane(JLayeredPane layered)
(a runtimeexception) if the
layered pane parameter is nullget
JWindow public void
setContentPane(Container contentPane)
(a runtimeexception) if the
content pane parameter is null
JWindow public void
setLayeredPane(JLayeredPane layeredPane)
(a runtimeexception) if the
content pane parameter is null
Window public void
setType(Window.Type type)
if the
window is displayable.
Window public void
setLocationByPlatform(boolean locationByPlatform)
if the window is
showing on screen and location
Window public void
setShape(Shape shape)
if the shape is not
null and the window is decorated
Window public void
setBackground(Color bgColor)
if the alpha value of the given background
color is less than 1.0f and the window is decorated