// 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. 不可恢复的生成错误mergemod.dll 2.0.2600.0

    在进行Visual Studio 2008 进行Winform打包时,提示 不可恢复的生成错误,很是郁闷,1.在“开始 - 运行” 中输入以下内容分三次来重新注册下Mergemod.dll. regs ...

  2. [Windows Azure] Windows Azure Identity

    Windows Azure Identity Managing identity is just as important in the public cloud is it is on premis ...

  3. 每日英语:Welcome to the Global Middle-Class Surge

    The mass uprisings this summer in Egypt, Turkey and Brazil are powerful reminders that the middle cl ...

  4. 【内核】linux2.6版本内核编译配置选项(二)

    目录 Linux2.6版本内核编译配置选项(一):http://infohacker.blog.51cto.com/6751239/1203633 Linux2.6版本内核编译配置选项(二):http ...

  5. frame自适应

    <html> <head> <title>frame自适应</title> </head> <frameset rows=" ...

  6. 如何去掉文件里的^M

    起因 csv文件用Python处理之后,有的地方跟着一个^M,特别好奇,以为是处理过程中产生的,后来想了想不是. 解决办法 尝试使用replace替换掉,但是失败了 查询原因,谷歌一番,发现是Wind ...

  7. Apache重写RewriteCond

    RewriteCond就像我们程序中的if语句一样,表示如果符合某个或某几个条件则执行RewriteCond下面紧邻的RewriteRule语句,这就是RewriteCond最原始.基础的功能,为了方 ...

  8. Website Develop: Handler “PageHandlerFactory-Integrated” has a bad module “ManagedPipelineHandler” in its module list

    1. install all features in IIS 2. Try the following steps to register it. run %windir%\Microsoft.NET ...

  9. C# 裁剪图片

    /// <summary> /// 生成缩略图 /// </summary> /// <param name="originalImagePath"& ...

  10. iOS同步后couldn't load project

    使用Cornerstone同步后,有时候出现下面的现象,点击运行,提示“couldn't load project” 解决方法: 1.鼠标右键点击工程“XX_Internal”,选择“show in ...