2009年1月7日水曜日

JavaFX TextBox (scene.control)

Swing の TextField も使えるが、 JavaFX のクラスで TextBox が用意されている

  1. import javafx.scene.control.*;  
  2. import javafx.scene.*;  
  3. import javafx.stage.*;  
  4. Stage {  
  5.      scene: Scene {  
  6.          content: TextBox {  
  7.              text: "Hello World"  
  8.              columns: 12  
  9.              selectOnFocus: true  
  10.          }  
  11.      }  
  12. }  


変数には
coulmns : Number
editable : Boolean
selectOnFocus : Boolean
text : String (編集と同時に update)
value : String (focus lost 時 or Enter press 時に update)

0 件のコメント:

コメントを投稿