Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

11
  • 7
    \$\begingroup\$ Java is winning the longest shortest code competition so far :) \$\endgroup\$ Commented Oct 29, 2015 at 16:50
  • 1
    \$\begingroup\$ - You don't need to initialize member variables to zero, so you can save two bytes (~0.45%) by converting "c=0" to "c". \$\endgroup\$ Commented Oct 29, 2015 at 20:16
  • 1
    \$\begingroup\$ And you can save one more byte by initializing the color in hex, i.e. new Color(0x800080). \$\endgroup\$ Commented Oct 29, 2015 at 20:17
  • 1
    \$\begingroup\$ @FranzD. Even better - just use the decimal number 8388736. \$\endgroup\$ Commented Oct 29, 2015 at 21:14
  • 1
    \$\begingroup\$ Get rid of JFrame, use Frame, allows you to remove javax import. \$\endgroup\$ Commented Nov 30, 2016 at 15:41