java.lang.IllegalArgumentException: adding a window to a container

Oracle Community | 807587 | 1 decade ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Compile Error in JTabbedPane when passing a JFrame object in the parameter

    Oracle Community | 1 decade ago | 807587
    java.lang.IllegalArgumentException: adding a window to a container

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      adding a window to a container

      at java.awt.Container.addImpl()
    2. Java RT
      JTabbedPane.addTab
      1. java.awt.Container.addImpl(Container.java:579)
      2. javax.swing.JTabbedPane.insertTab(JTabbedPane.java:568)
      3. javax.swing.JTabbedPane.addTab(JTabbedPane.java:640)
      3 frames
    3. Unknown
      Sample.main
      1. Sample.<init>(Sample.java:30)
      2. Sample.main(Sample.java:48)
      2 frames