java.lang.Error: Do not use Talk2Me.ChatRoom.add() use Talk2Me.ChatRoom.getContentPane().add() instead

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Oracle Community by 807549, 1 year ago
Do not use Talk2Me.ChatRoom.add() use Talk2Me.ChatRoom.getContentPane().add() instead
via Oracle Community by 807598, 1 year ago
Do not use ButtonFrame.add() use ButtonFrame.getContentPane().add() instead
via Oracle Community by 807597, 1 year ago
Do not use lab1.add() use lab1.getContentPane().add() instead
via Coderanch by Mitchell Mock, 1 year ago
Do not use javax.swing.JFrame.add() use javax.swing.JFrame.getContentPane().add() instead
via Google Groups by Fuddzy, 3 months ago
Do not use javax.swing.JFrame.add() use javax.swing.JFrame.getContentPane().add() instead
via Stack Overflow by Extorcs
, 2 months ago
Do not use javax.swing.JFrame.add() use javax.swing.JFrame.getContentPane().add() instead
java.lang.Error: Do not use Talk2Me.ChatRoom.add() use Talk2Me.ChatRoom.getContentPane().add() instead
at javax.swing.JFrame.createRootPaneException(JFrame.java:458)
at javax.swing.JFrame.addImpl(JFrame.java:484)
at java.awt.Container.add(Container.java:307)
at Talk2Me.ChatRoom.colorBtnMouseClicked(ChatRoom.java:257)
at Talk2Me.ChatRoom.access$100(ChatRoom.java:12)
at Talk2Me.ChatRoom$2.mouseClicked(ChatRoom.java:190)
at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:208)
at java.awt.Component.processMouseEvent(Component.java:5096)
at java.awt.Component.processEvent(Component.java:4890)
at java.awt.Container.processEvent(Container.java:1566)
at java.awt.Component.dispatchEventImpl(Component.java:3598)
at java.awt.Container.dispatchEventImpl(Container.java:1623)
at java.awt.Component.dispatchEvent(Component.java:3439)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3174)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
at java.awt.Container.dispatchEventImpl(Container.java:1609)
at java.awt.Window.dispatchEventImpl(Window.java:1585)
at java.awt.Component.dispatchEvent(Component.java:3439)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)

Users with the same issue

You are the first who have seen this exception.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.