Description
This code works well:
def frame = new JFrame()
frame.setLocationRelativeTo(null)
But this one throws exception:
def frame = new JFrame()
frame.locationRelativeTo = null
But it is possible to use locationRelativeTo in SwingBuilder, like if
it is existing property.
Example:
def swing = new SwingBuilder()
def frame = swing.frame(
title: "Cool Groovy Frame",
defaultCloseOperation: JFrame.EXIT_ON_CLOSE,
preferredSize: [400, 400],
size: [400, 400],
locationRelativeTo: null,
)
Attachments
Issue Links
- is duplicated by
-
GROOVY-1150 Strange behavior on property setter
- Closed