2012-10-12 27 views

回答

1

帮我如何增加的JSpinner箭头的大小按触摸屏上的要求桌面

  • 甚至能够改变

    一)PreferredSizeButtons(在APIIcons size 8x8限制,必须重写过)

    B)重新布局Buttons中的JSpinner一个在LEFT (or SOUTH)和第二或RIGHT (or NORTH)

  • JSpinner我不会走这方式


  • 创建JTextField/JFormattedTextFieldDocumentListener,实施有所有限制到DocumentFilterby default for JSpinner is there the same requirements too

  • 放在那里(通过使用JButton#setXxxIcon来设定自己的Icon)两大JButtons,为inc/des creasing

  • Date/Calendar正确使用JCalendarJDatePicker

+0

非常感谢... –

1

您可以尝试下列操作之一:

  • 看到,如果一个size variant可供您选择的外观&感觉。

  • 使用UIManager.put()方法更改Spinner.arrowButtonSize属性。

+0

非常感谢你... –

+0

请详细说明第二个选项。属性arrowButtonSize找不到。 – Mishty

+0

对于[示例](http://nadeausoftware.com/articles/2008/11/all_ui_defaults_names_common_java_look_and_feels_windows_mac_os_x_and_linux),关键是“Spinner.arrowButtonSize”,但并非所有的L&F都支持它。 – trashgod

1

变化的JButton的在旋转部件的尺寸是这样的:

 spn = new JSpinner(); 
     spn.getComponent(0).setPreferredSize(new Dimension(40,40)); 

JSpinner的具有三个部件。两个JButton和一个JTextField。

  1. 第一部分是Next按钮
  2. 第二个组成部分是previousButton
  3. 第三部分是NumberEditor
相关问题