Created
December 20, 2013 09:04
A simple view corresponding to an example that shows how to use JFormattedTextField.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package testformatted | |
import java.text.NumberFormat | |
import javax.swing.JFormattedTextField | |
application(title: 'testformatted', | |
preferredSize: [320, 240], | |
pack: true, | |
//location: [50,50], | |
locationByPlatform: true, | |
iconImage: imageIcon('/griffon-icon-48x48.png').image, | |
iconImages: [imageIcon('/griffon-icon-48x48.png').image, | |
imageIcon('/griffon-icon-32x32.png').image, | |
imageIcon('/griffon-icon-16x16.png').image]) { | |
// add content here | |
vbox{ | |
label(text:bind{model.mylabel}) | |
textField(text:bind(target: model, targetProperty: 'mylabel')) | |
separator() | |
label(text:bind{model.mynumber}) | |
widget(new JFormattedTextField(NumberFormat.getNumberInstance()),id:"myformatted",value:bind(target: model, targetProperty: 'mynumber')) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment