我想用getDesktopProperty()函数得到系统任务栏的属性值,就是不知道这个属性的名字
高手指点一下
高手指点一下
解决方案 »
- 在tomcat中使用数据库连接池的问题
- Hibernate 二级缓存 无法启动 跪求高手!
- jfreechar 横轴的标签字能否竖直排列,而不是旋转??!!
- Java Socket实现和服务器的长连接
- 辣手的问题!code生成算法
- 在hibernate中关联映射如何控制
- 推荐在hibernate基础上构建的快速开发框架,新功能:对ajax的支持,带排序、分页功能的列表
- 请问如何提供数据给webuijsf:table?
- 怎么可以点击附件下载的时候屏蔽迅雷直接用网页下载!!急... 在线等
- [求助]部署EJB出现问题!麻烦哪位高手指点指点啊!先谢了!
- 下拉列表框的中的tree
- Hibernate中的悲观锁为什么实现不了?
.getDesktopProperty("win.propNames");
System.out.println("Supported windows property names:");
for (int i = 0; i < propnames.length; i++) {
System.out.println(propnames[i]);
}Supported windows property names:
DnD.gestureMotionThreshold
awt.dynamicLayoutSupported
awt.file.showAttribCol
awt.file.showHiddenFiles
awt.font.desktophints
awt.mouse.numButtons
awt.multiClickInterval
awt.wheelMousePresent
win.3d.backgroundColor
win.3d.darkShadowColor
win.3d.highlightColor
win.3d.lightColor
win.3d.shadowColor
win.ansiFixed.font
win.ansiFixed.font.height
win.ansiVar.font
win.ansiVar.font.height
win.button.textColor
win.defaultGUI.font
win.defaultGUI.font.height
win.desktop.backgroundColor
win.deviceDefault.font
win.deviceDefault.font.height
win.drag.height
win.drag.width
win.frame.activeBorderColor
win.frame.activeCaptionColor
win.frame.activeCaptionGradientColor
win.frame.backgroundColor
win.frame.captionButtonHeight
win.frame.captionButtonWidth
win.frame.captionFont
win.frame.captionFont.height
win.frame.captionGradientsOn
win.frame.captionHeight
win.frame.captionTextColor
win.frame.color
win.frame.fullWindowDragsOn
win.frame.inactiveBorderColor
win.frame.inactiveCaptionColor
win.frame.inactiveCaptionGradientColor
win.frame.inactiveCaptionTextColor
win.frame.sizingBorderWidth
win.frame.smallCaptionButtonHeight
win.frame.smallCaptionButtonWidth
win.frame.smallCaptionFont
win.frame.smallCaptionFont.height
win.frame.smallCaptionHeight
win.frame.textColor
win.highContrast.on
win.icon.font
win.icon.font.height
win.icon.hspacing
win.icon.shellIconBPP
win.icon.titleWrappingOn
win.icon.vspacing
win.item.highlightColor
win.item.highlightTextColor
win.item.hotTrackedColor
win.item.hotTrackingOn
win.mdi.backgroundColor
win.menu.backgroundColor
win.menu.buttonWidth
win.menu.font
win.menu.font.height
win.menu.height
win.menu.keyboardCuesOn
win.menu.textColor
win.menubar.backgroundColor
win.messagebox.font
win.messagebox.font.height
win.oemFixed.font
win.oemFixed.font.height
win.properties.version
win.scrollbar.backgroundColor
win.scrollbar.height
win.scrollbar.width
win.sound.asterisk
win.sound.close
win.sound.default
win.sound.exclamation
win.sound.exit
win.sound.hand
win.sound.maximize
win.sound.menuCommand
win.sound.menuPopup
win.sound.minimize
win.sound.open
win.sound.question
win.sound.restoreDown
win.sound.restoreUp
win.sound.start
win.status.font
win.status.font.height
win.system.font
win.system.font.height
win.systemFixed.font
win.systemFixed.font.height
win.text.fontSmoothingContrast
win.text.fontSmoothingOn
win.text.fontSmoothingOrientation
win.text.fontSmoothingType
win.text.grayedTextColor
win.tooltip.backgroundColor
win.tooltip.font
win.tooltip.font.height
win.tooltip.textColor
win.xpstyle.colorName
win.xpstyle.dllName
win.xpstyle.sizeName
win.xpstyle.themeActive
分肯定给,顺便问一下,
我自己做了一个自定义的Frame,就是标题栏隐藏然后标题栏都自己实现就是像Msn的窗口一样。
但是我发现,窗口最大化的时候,就变成全屏了,下面的任务栏也都覆盖住了,有办法和正常的窗口一样的,最大化的时候任务栏不被覆盖呢?
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author zhabu
*/
public class TFrame extends JFrame { public TFrame() {
this.setUndecorated(true);
this.setBounds(100, 100, 300, 300);
this.setLayout(null); JButton btnMax = new JButton("MaxFrame");
btnMax.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) {
btnMaxActionPerformed(evt);
}
});
btnMax.setBounds(100, 100, 100, 25);
this.getContentPane().add(btnMax); JButton btnClose = new JButton("CloseFrame");
btnClose.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) {
btnCloseActionPerformed(evt);
}
});
btnClose.setBounds(100, 130, 100, 25);
this.getContentPane().add(btnClose); } private void btnMaxActionPerformed(java.awt.event.ActionEvent evt) {
this.setExtendedState(JFrame.MAXIMIZED_BOTH);
} private void btnCloseActionPerformed(java.awt.event.ActionEvent evt) {
System.exit(0);
} public static void main(String args[]){
TFrame frame = new TFrame();
frame.setVisible(true);
}
}
不好意思,我的代码太乱了,整理提出来的,所以慢了点儿!
this.setSize(rec.width, rec.height);
但是如果任务栏的高度变化的话,不会跟着变呀(比如把任务栏拖动到上面)。
我也用类似的代码达到过这个效果,代码如下
Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
Insets insets = Toolkit.getDefaultToolkit().getScreenInsets(frame.getGraphicsConfiguration());
frame.setSize(screenSize.width, screenSize.height-insets.bottom);但是一样的结果,如果任务栏的状态变化了就不行了。