100 分请高手路过下 Frame的一些修饰看着一点都不爽!想请搞手指点下,怎么自定义标题栏背景,换掉放大,缩小,关闭按钮图标加上换掉Frame的边框! 如果有时间,请来点code 发贴不如QQ群聊得爽! TWaver SWING UI 群号:26532363 extending 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 可以弄张大的背景图吧 然后绘制的话可以参考部分资料 core上就有啊 具体点!JFrame的标题贴背景图片?怎么贴?全贴了我的事件按钮怎么办?自己绘,好想画! 可以来点code吗?风格----指得是什么?皮肤?如果是皮肤好像有点改不了? 在线等高手指教! 皮肤可以改LookAndFeel 可以用jdk1.6_10自带的vista玻璃效果,或更改皮肤啊。/* * To change this template, choose Tools | Templates * and open the template in the editor. */package com.zrx.appviewer;import java.awt.EventQueue;import javax.swing.JButton;import javax.swing.JFrame;import javax.swing.JLabel;import javax.swing.JPasswordField;import javax.swing.JTextField;import javax.swing.UIManager;import javax.swing.UnsupportedLookAndFeelException;import com.birosoft.liquid.LiquidLookAndFeel;public class LoginFrm extends JFrame { private JPasswordField passwordField; private JTextField textField; private static final long serialVersionUID = -6945936414733530893L; public static void main(String args[]) { EventQueue.invokeLater(new Runnable() { public void run() { try { windowsLooks(); liquidLooks(); LoginFrm frame = new LoginFrm(); frame.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } /** * 利用Swing的LookAndFeel也可以实现时下流行的换肤功能 这里我们选用的第三方皮肤库为liquidlnf * 这是一套比较好的皮肤,支持mac风格 */ private void liquidLooks() throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException { UIManager .setLookAndFeel("com.birosoft.liquid.LiquidLookAndFeel");// LiquidLookAndFeel.setLiquidDecorations(true); LiquidLookAndFeel.setLiquidDecorations(true, "mac"); } /** * 使用SWING自己代的皮肤中的WINDOWS中的皮肤 请在main函数中插入该段代码 (注意:要将其放置在窗口定义语句的前面) * 如果观看该效果,请去掉该条语句的注释 */ private void windowsLooks() throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException { javax.swing.UIManager .setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); } }); } /** * Create the frame */ public LoginFrm() { super(); getContentPane().setLayout(null); setResizable(false); setTitle("测试窗口"); setBounds(100, 100, 382, 258); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); final JLabel username = new JLabel(); username.setText("用户名:"); username.setBounds(29, 47, 93, 25); getContentPane().add(username); final JLabel pwd = new JLabel(); pwd.setText("口令:"); pwd.setBounds(29, 108, 93, 33); getContentPane().add(pwd); textField = new JTextField(); textField.setBounds(128, 48, 205, 22); getContentPane().add(textField); passwordField = new JPasswordField(); passwordField.setBounds(128, 113, 207, 22); getContentPane().add(passwordField); final JButton button = new JButton(); button.setText("登陆"); button.setBounds(227, 168, 106, 28); getContentPane().add(button); final JButton button_1 = new JButton(); button_1.setText("取消"); button_1.setBounds(28, 168, 106, 28); getContentPane().add(button_1); // }} 如果自绘的话,怎样保证整体程序的界面效果一致不会每个都要自绘吧,应该绘一个都可以用吧?譬如回了关闭按钮,JFrame ,JDialog 都可以用?没绘过,想试试,哪位有经验说下 java socket 通信问题 求助:关于JTextPane的应用问题? netbeans怎用代码显示保存对话框 生成jar的问题 java sql 问题 一个LISTENER的小问题[请教] 关于Microsoft SQL Server 2000 Driver for JDBC驱动的问题 怎样实现类似聊天室的自动滚屏?? 关于内部类的问题 JButton如何实现按钮被按下,不反弹。谢谢 谁能帮我解释一下这几个正则表达式是什么意思? 【JAVA】用bin.readLine()输入数据后用bw.write()写入文本后显示的却是ASCII码,怎么办?
具体点!JFrame的标题贴背景图片?怎么贴?全贴了我的事件按钮怎么办?自己绘,好想画! 可以来点code吗?
风格----指得是什么?皮肤?如果是皮肤好像有点改不了? 在线等高手指教!
LookAndFeel
可以用jdk1.6_10自带的vista玻璃效果,或更改皮肤啊。/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/package com.zrx.appviewer;
import java.awt.EventQueue;import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPasswordField;
import javax.swing.JTextField;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;import com.birosoft.liquid.LiquidLookAndFeel;public class LoginFrm extends JFrame { private JPasswordField passwordField;
private JTextField textField;
private static final long serialVersionUID = -6945936414733530893L; public static void main(String args[]) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
windowsLooks();
liquidLooks();
LoginFrm frame = new LoginFrm();
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
} /**
* 利用Swing的LookAndFeel也可以实现时下流行的换肤功能 这里我们选用的第三方皮肤库为liquidlnf
* 这是一套比较好的皮肤,支持mac风格
*/
private void liquidLooks() throws ClassNotFoundException,
InstantiationException, IllegalAccessException,
UnsupportedLookAndFeelException {
UIManager
.setLookAndFeel("com.birosoft.liquid.LiquidLookAndFeel");
// LiquidLookAndFeel.setLiquidDecorations(true);
LiquidLookAndFeel.setLiquidDecorations(true, "mac");
} /**
* 使用SWING自己代的皮肤中的WINDOWS中的皮肤 请在main函数中插入该段代码 (注意:要将其放置在窗口定义语句的前面)
* 如果观看该效果,请去掉该条语句的注释
*/
private void windowsLooks() throws ClassNotFoundException,
InstantiationException, IllegalAccessException,
UnsupportedLookAndFeelException {
javax.swing.UIManager
.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
}
});
} /**
* Create the frame
*/
public LoginFrm() {
super();
getContentPane().setLayout(null);
setResizable(false);
setTitle("测试窗口");
setBounds(100, 100, 382, 258);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); final JLabel username = new JLabel();
username.setText("用户名:");
username.setBounds(29, 47, 93, 25);
getContentPane().add(username); final JLabel pwd = new JLabel();
pwd.setText("口令:");
pwd.setBounds(29, 108, 93, 33);
getContentPane().add(pwd); textField = new JTextField();
textField.setBounds(128, 48, 205, 22);
getContentPane().add(textField); passwordField = new JPasswordField();
passwordField.setBounds(128, 113, 207, 22);
getContentPane().add(passwordField); final JButton button = new JButton();
button.setText("登陆");
button.setBounds(227, 168, 106, 28);
getContentPane().add(button); final JButton button_1 = new JButton();
button_1.setText("取消");
button_1.setBounds(28, 168, 106, 28);
getContentPane().add(button_1);
//
}}
不会每个都要自绘吧,应该绘一个都可以用吧?
譬如回了关闭按钮,JFrame ,JDialog 都可以用?
没绘过,想试试,哪位有经验说下