java.lang.Error: Do not use javax.swing.JFrame.add() use javax.swing.JFrame.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 807554, 1 year ago
Do not use javax.swing.JFrame.add() use javax.swing.JFrame.getContentPane().add() instead
via Google Groups by Tobias Müller, 1 month 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
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 user481710
, 7 months ago
Do not use javax.swing.JFrame.add() use javax.swing.JFrame.getContentPane().add() instead
java.lang.Error: Do not use javax.swing.JFrame.add() use javax.swing.JFrame.getContentPane().add() instead
at javax.swing.JFrame.createRootPaneException(JFrame.java:402)
at javax.swing.JFrame.addImpl(JFrame.java:428)
at java.awt.Container.add(Container.java:228)
at undefined.Proyecto.(Proyecto.java:43)
at undefined.Proyecto.main(Proyecto.java:208)

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.