e803. 获得和设置JProgressBar的值
2024-08-20 17:01:46
// To create a progress bar, see e801 创建一个JProgressBar组件 // Get the current value
int value = progress.getValue(); // Get the minimum value
int min = progress.getMinimum(); // Get the maximum value
int max = progress.getMaximum(); // Change the minimum value
int newMin = 0;
progress.setMinimum(newMin); // Change the maximum value
int newMax = 256;
progress.setMaximum(newMax); // Set the value; the new value will be forced into the bar's range
int newValue = 33;
progress.setValue(newValue);
It is also possible to set all the values at once by using the model:
progress.getModel().setRangeProperties(newValue, 0, newMin, newMax, false);
Related Examples |
最新文章
- .NET (上传的)文件下载
- centos安装docker
- BZOJ3738 : [Ontak2013]Kapitał
- 下拉列表autocomplete各种实现方式比较
- 恒天云IaaS基础设施标准
- XBox360自制系统的更新(Update)
- 货币小写转大写.htm
- WPF技术触屏上的应用系列(一): 3D 图片(照片)墙、柱面墙(凹面墙或者叫远景墙、凸面墙或者叫近景墙)实现
- [转]Native Java Bytecode Debugging without Source Code
- 使用Stardict命令行版本sdcv
- C#数据结构之串
- HTTP常用状代码
- python爬虫第六天
- editormd实现Markdown编辑器写文章功能
- slam course
- 若是汉字的一半,就舍弃这个汉字输出,例如:“js3范ad啊asd”,截取4,则输出:“js3”
- Ajax+innerHTML+Dgls=好的用户体验+高性能+高效率
- python操作adb代码
- linux weather
- 【数据库】python访问mysql
热门文章
- java RSA 生成公钥私钥
- Testng生成的测试报告乱码解决办法
- LeetCode: 【L4】N-Queens 解题报告
- 【自动化测试】selenium之 chromedriver与chrome版本映射表
- whatweb wordpress.rb
- python 获取有关访问者的浏览器的 细节
- spring security 注解@EnableGlobalMethodSecurity详解
- <;![CDATA[ ]]>;是什么意思
- [serial]基于select/poll/epoll的串口操作
- Introduction to MyBatis Generator Mybatis代码生成介绍