java.lang.RuntimeException: Uncompilable source code - non-static method setPreferredSize(java.awt.Dimension) cannot be referenced from a static context

Coderanch | abalfazl hossein | 6 years 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

    Swing simple

    Coderanch | 6 years ago | abalfazl hossein
    java.lang.RuntimeException: Uncompilable source code - non-static method setPreferredSize(java.awt.Dimension) cannot be referenced from a static context

    Root Cause Analysis

    1. java.lang.RuntimeException

      Uncompilable source code - non-static method setPreferredSize(java.awt.Dimension) cannot be referenced from a static context

      at simplegui.SimpleGui.main()
    2. simplegui
      SimpleGui.main
      1. simplegui.SimpleGui.main(SimpleGui.java:24)
      1 frame