以图片为背景 的登陆界面
2013-07-15 21:33
387 查看
//以图片为背景 的登陆界面 import java.awt.*; import javax.swing.*; public class Image extends JFrame { private JLabel jlable1, jlable2, jlable3; private JTextField jtext1, jtext2; private JButton jbutton1, jbutton2; private ImageIcon ico; private JLayeredPane lay; private JPanel jpan1; public Image() { setBounds(300, 200, 300, 250); jlable1 = new JLabel("用户名:"); jlable2 = new JLabel("密码:"); jtext1 = new JTextField(20); jtext2 = new JTextField(20); jbutton1 = new JButton("登陆"); jpan1 = new JPanel(); jpan1.setLayout(null); jpan1.add(jlable1); jlable1.setBounds(30, 40, 50, 20); jpan1.add(jtext1); jtext1.setBounds(80, 40, 150, 20); jpan1.add(jlable2); jlable2.setBounds(30, 80, 50, 20); jpan1.add(jtext2); jtext2.setBounds(80, 80, 150, 20); jpan1.add(jbutton1); jbutton1.setBounds(80, 150, 100, 30); ico = new ImageIcon("images/1.jpg"); jlable3 = new JLabel(ico); jlable3.setBounds(0, 0, ico.getIconWidth(), ico.getIconHeight()); this.getLayeredPane().setLayout(null); this.getLayeredPane().add(jlable3, new Integer(Integer.MIN_VALUE)); this.setContentPane(jpan1); jpan1.setOpaque(false); } public static void main(String args[]) { new Image().setVisible(true); } }
相关文章推荐
- 修改win7开机登陆界面背景图片
- Win7中通过修改注册表自定义开机登陆界面的背景图片图文教程
- SAP BASIS SE43修改SAP标准菜单,登陆界面,背景图片
- JAVA之简单界面设计(布局,更改背景图片,按钮监听 + 数据库登陆注册相关..)
- ubuntu14.04 更换登陆界面背景图片的方法
- 如何修改Win7开机登陆界面背景图片
- 无需任何软件,简单修改Win7开机登陆界面背景图片
- se43修改sap标准菜单,登陆界面,背景图片
- 关于登陆界面背景图片缩放变形的解决方法
- 系统登陆界面开发及实现之(二)添加界面背景图片
- JAVA登陆界面添加背景图片和音乐
- 给ios界面设图片背景
- android 界面 按button或者imagebutton改变图片或者背景的效果
- android4.4 Launcher主菜单界面同样采用背景图片的方式
- Android对于界面底部N个按钮平分屏幕宽度且保持按钮背景图片不变形的解决方案
- Android中欢迎界面背景图片放大效果
- iOS开发笔记--将图片设置为主界面背景
- MFC中在界面上添加背景图片的方法
- MTK界面设计中消除PNG图片的杂色背景
- 登录界面login.jsp背景图片兼容性