// Create a number spinner
JSpinner spinner = new JSpinner(); // Get the text field
JFormattedTextField tf =
((JSpinner.DefaultEditor)spinner.getEditor()).getTextField(); // Set the margin (add two spaces to the left and right side of the value)
int top = 0;
int left = 2;
int bottom = 0;
int right = 2;
Insets insets = new Insets(top, left, bottom, right);
tf.setMargin(insets);
Related Examples

e790. 设置JSpinner的边框的更多相关文章

  1. SB中设置UITextField 无边框,真机上输入汉字聚焦时,文字 下沉

    解决方案:sb中一定要设置有边框,然后在代码里设置成无边框 然后正常了. 参考:https://segmentfault.com/q/1010000007244564/a-10200000073481 ...

  2. winform设置button的边框颜色,或取消边框颜色,不显示边框

    // winform设置边框颜色不像webform那么简单,可以通过设置FlatAppearance,也可以通过重绘实现. 一.设置按钮本身属性 buttonBubufx.FlatStyle = Fl ...

  3. QT QProgressBar QProgressDialog 模态,位置设置,无边框,进度条样式

    一  关于模态设置 QProgressDialog可以设置模态(需要在new的时候传入parent),QProgressBar设置不好: 只有dialog可以设置模态,widget不能设置模态(QPr ...

  4. iOS设置分割线从边框顶端开始

    好方法,本来是在xib里面设置自定义分割线位置,结果还是差15像素,该方法亲测好使. IOS8 设置TableView Separatorinset 分割线从边框顶端开始 (转) 在ios8上 [Ta ...

  5. UIButton设置圆角和边框及边框颜色

    1. 按钮边框颜色 //设置边框颜色 [btn.layer setMasksToBounds:YES]; [btn.layer setCornerRadius:10.0]; //设置矩形四个圆角半径 ...

  6. 使用shape设置只有部分边框有颜色

    <?xml version="1.0" encoding="UTF-8"?> <layer-list xmlns:android=" ...

  7. CSS 设置TABLE 表格 边框

    /*table列表 合并边框设置*/ .tablelist { border-collapse:collapse; } /*table列表 设置边框宽度及颜色*/ .tablelist td { bo ...

  8. iOS之用xib给控件设置圆角、边框效果

    xib中为各种控件设置圆角 通过代码的方式设置 @interface ViewController () @property (weak, nonatomic) IBOutlet UIView *my ...

  9. poi设置excel表格边框、字体等

    POI中可能会用到一些需要设置EXCEL单元格格式的操作小结: 先获取工作薄对象: HSSFWorkbook wb = new HSSFWorkbook(); HSSFSheet sheet = wb ...

随机推荐

  1. pandas数组和numpy数组在使用索引数组过滤数组时的区别

    numpy array 过滤后的数组,索引值从 0 开始. pandas Series 过滤后的 Series ,保持原来的索引,原来索引是几,就是几. 什么意思呢,来看个栗子: import num ...

  2. [Windows Azure] Windows Azure Execution Models

    Windows Azure Execution Models Windows Azure provides different execution models for running applica ...

  3. 每日英语:Six Ways to Modernize Your Car

    AS AUTO MAKERS ADD far-out features to the latest cars at warp speed--everything from futuristic hea ...

  4. Android 支付宝接口调用

    在近期,公司需要开发一个关于在线支付的模块,所以需要用到第三方支付平台 转载请注明出处:http://blog.csdn.net/ht_android/article/details/45307165 ...

  5. 【Socket】linux无连接编程技术

      1.mystery引入      1)无连接编程也称为UDP编程,是采用UDP报文的形式完成的网络通信    2)UDP是一种对等通信,本身不区分服务器端和客户端    3)对等通信,最容易想到的 ...

  6. scp拷贝提示its a directory 错误

    scp拷贝提示its a directory 错误 场景 使用scp的格式是 scp my_file user@ip:/home/directory 之前也一直这么用,没什么错误,莫名其妙 原因定位 ...

  7. mac电脑的系统偏好设置的安全与隐私的任何来源没有了

    打开电脑搜索   输入终端   打开终端输入 sudo spctl --master-disable

  8. python seaborn 画图

    python seaborn 画图 59888745@qq.com 2017.08.02 distplot( )  kdeplot( ) distplot( )为hist加强版, kdeplot( ) ...

  9. win10开始菜单打不开,右下角时间点不开等问题

    服务--“User Manager",启动后,重启桌面进程

  10. 【进阶修炼】——改善C#程序质量(5)

    71, 区分异步和多线程的应用场景. 计算机的很多硬件,如硬盘,光驱,声卡,网卡都有DMA(Direct Memory Access)功能,它可以不占用cpu的资源,而异步的提出恰恰就是基于这个的.而 ...