java.lang.Error

Do not use Frame.setLayout() use Frame.getContentPane().setLayout() instead

Solutions on the web661

  • via Oracle Community by 807593, 11 months ago
    Do not use Frame.setLayout() use Frame.getContentPane().setLayout() instead
  • via Coderanch by Derek Harper, 9 months ago
    Do not use Playback.setLayout() use Playback.getContentPane().setLayout() instead
  • via Oracle Community by 843790, 1 year ago
    Do not use javax.swing.JInternalFrame.setLayout() use javax.swing.JInternalFrame.getContentPane().setLayout() instead
  • Stack trace

    • java.lang.Error: Do not use Frame.setLayout() use Frame.getContentPane().setLayout() instead at javax.swing.JFrame.createRootPaneException(JFrame.java:44) at javax.swing.JFrame.setLayout(JFrame.java:510) at FlowingButtons.main(FlowingButtons.java:7)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    You are the first who have seen this exception. Write a tip to help other users and build your expert profile.