java.lang.IllegalArgumentException: cannot add to layout: constraint must be a string

Coderanch | Hernan Eche | 6 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Can anybody help with exception (Swing / AWT / SWT forum at Coderanch)

    coderanch.com | 10 months ago
    java.lang.IllegalArgumentException: cannot add to layout: constraint must be a string
  2. 0

    Can anybody help with exception

    Coderanch | 6 years ago | Hernan Eche
    java.lang.IllegalArgumentException: cannot add to layout: constraint must be a string

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      cannot add to layout: constraint must be a string

      at java.awt.CardLayout.addLayoutComponent()
    2. Java RT
      JTabbedPane.add
      1. java.awt.CardLayout.addLayoutComponent(CardLayout.java:190)
      2. java.awt.Container.addImpl(Container.java:1074)
      3. javax.swing.JTabbedPane.insertTab(JTabbedPane.java:703)
      4. javax.swing.JTabbedPane.addTab(JTabbedPane.java:777)
      5. javax.swing.JTabbedPane.add(JTabbedPane.java:814)
      5 frames
    3. remotepump
      RemotePump$1.windowOpened
      1. remotepump.RemotePump.formWindowOpened(RemotePump.java:184)
      2. remotepump.RemotePump.access$000(RemotePump.java:31)
      3. remotepump.RemotePump$1.windowOpened(RemotePump.java:117)
      3 frames
    4. Java RT
      EventDispatchThread.run
      1. java.awt.AWTEventMulticaster.windowOpened(AWTEventMulticaster.java:322)
      2. java.awt.Window.processWindowEvent(Window.java:1862)
      3. javax.swing.JFrame.processWindowEvent(JFrame.java:274)
      4. java.awt.Window.processEvent(Window.java:1823)
      5. java.awt.Component.dispatchEventImpl(Component.java:4630)
      6. java.awt.Container.dispatchEventImpl(Container.java:2099)
      7. java.awt.Window.dispatchEventImpl(Window.java:2478)
      8. java.awt.Component.dispatchEvent(Component.java:4460)
      9. java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
      10. java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
      11. java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
      12. java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
      13. java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
      14. java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
      15. java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
      15 frames