//package com.cn;import javax.swing.*;
import java.awt.*;public class MyMun { /**
* @param args
*/
JLabel backlabel = null;
JFrame chuangkou = null; public MyMun() {
chuangkou = new JFrame("企业管理系统");
// JPanel jpanel1=new JPanel();
// jpanel1.setBackground(Color.red);
backlabel = new JLabel();
backlabel.setVerticalAlignment(SwingConstants.TOP);
backlabel.setHorizontalAlignment(SwingConstants.CENTER);
uptupian();
JDesktopPane desktoppane = new JDesktopPane();
desktoppane.add(backlabel, new Integer(Integer.MIN_VALUE));
JPanel jpanel2 = new JPanel();
jpanel2.setBackground(Color.black);
//JPanel jpanel3 = new JPanel();
//jpanel3.setBackground(Color.blue); Container conn = chuangkou.getContentPane();
conn.add(desktoppane);
// conn.add(jpanel1,BorderLayout.SOUTH);
conn.add(jpanel2, BorderLayout.NORTH);
//conn.add(jpanel3, BorderLayout.CENTER);
JMenuBar caidanlan = new JMenuBar();
// caidanlan.setBorderPainted(falsh);
JMenu caidan = new JMenu("基础信息管理");
JMenu caidan1 = new JMenu("进货管理");
JMenu caidan2 = new JMenu("销售管理");
JMenu caidan3 = new JMenu("查询统计");
JMenu caidan4 = new JMenu("库存管理");
JMenu caidan5 = new JMenu("系统管理");
caidanlan.add(caidan);
caidanlan.add(caidan1);
caidanlan.add(caidan2);
caidanlan.add(caidan3);
caidanlan.add(caidan4);
caidanlan.add(caidan5);
chuangkou.setJMenuBar(caidanlan);
chuangkou.setSize(800, 600);
chuangkou.setVisible(true);
} public void uptupian() {
if (backlabel != null) {
int backw = MyMun.this.chuangkou.getWidth();
int backh = chuangkou.getHeight();
backlabel.setSize(backw, backh);
backlabel.setText("<html><body><image width='" + backw
+ "'height='" + (backh) + "'src="
+ MyMun.this.getClass().getResource("a.jpg")
+ "'></img></body></html>");
} }
static {
try
{
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
}catch(Exception e)
{e.printStackTrace();}
}
public static void main(String[] args) {
// TODO Auto-generated method stub new MyMun();
}}
import java.awt.*;public class MyMun { /**
* @param args
*/
JLabel backlabel = null;
JFrame chuangkou = null; public MyMun() {
chuangkou = new JFrame("企业管理系统");
// JPanel jpanel1=new JPanel();
// jpanel1.setBackground(Color.red);
backlabel = new JLabel();
backlabel.setVerticalAlignment(SwingConstants.TOP);
backlabel.setHorizontalAlignment(SwingConstants.CENTER);
uptupian();
JDesktopPane desktoppane = new JDesktopPane();
desktoppane.add(backlabel, new Integer(Integer.MIN_VALUE));
JPanel jpanel2 = new JPanel();
jpanel2.setBackground(Color.black);
//JPanel jpanel3 = new JPanel();
//jpanel3.setBackground(Color.blue); Container conn = chuangkou.getContentPane();
conn.add(desktoppane);
// conn.add(jpanel1,BorderLayout.SOUTH);
conn.add(jpanel2, BorderLayout.NORTH);
//conn.add(jpanel3, BorderLayout.CENTER);
JMenuBar caidanlan = new JMenuBar();
// caidanlan.setBorderPainted(falsh);
JMenu caidan = new JMenu("基础信息管理");
JMenu caidan1 = new JMenu("进货管理");
JMenu caidan2 = new JMenu("销售管理");
JMenu caidan3 = new JMenu("查询统计");
JMenu caidan4 = new JMenu("库存管理");
JMenu caidan5 = new JMenu("系统管理");
caidanlan.add(caidan);
caidanlan.add(caidan1);
caidanlan.add(caidan2);
caidanlan.add(caidan3);
caidanlan.add(caidan4);
caidanlan.add(caidan5);
chuangkou.setJMenuBar(caidanlan);
chuangkou.setSize(800, 600);
chuangkou.setVisible(true);
} public void uptupian() {
if (backlabel != null) {
int backw = MyMun.this.chuangkou.getWidth();
int backh = chuangkou.getHeight();
backlabel.setSize(backw, backh);
backlabel.setText("<html><body><image width='" + backw
+ "'height='" + (backh) + "'src="
+ MyMun.this.getClass().getResource("a.jpg")
+ "'></img></body></html>");
} }
static {
try
{
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
}catch(Exception e)
{e.printStackTrace();}
}
public static void main(String[] args) {
// TODO Auto-generated method stub new MyMun();
}}
解决方案 »
- java1.7.0_09环境变量设置后能显示java 命令但是找不到javac命令
- 怎么样不基于开发软件运行java?
- 如何获取一个文件的md5值 C#
- 再发:用java的applet调用delphi封装第三方动态库函数的exe文件出错,急!!!!!分不够再加
- 请教哲学家就餐的线程算法!
- 刚开始学java,有个特别简单的问题
- 怎么改变系统托盘(java.awt.SystemTray)的外观风格?
- 学java如何开始?
- 你们写简历的时候当写到Java的水平的时候该怎么写。
- java问题
- 如何多次使用数据库连接??超级简单的问题 100分
- 多个excel文件,合并成一个excel文件,要求是:原多个excel文件内容对应为生成的excel文件的其中一个工作簿
package com.cn; import javax.swing.*;
import java.awt.*;public class MyMun { /**
* @param args
*/
JLabel backlabel = null; JFrame chuangkou = null; public MyMun() {
chuangkou = new JFrame("企业管理系统");
// JPanel jpanel1=new JPanel();
// jpanel1.setBackground(Color.red); uptupian();
//JDesktopPane desktoppane = new JDesktopPane();
//desktoppane.add(backlabel, new Integer(Integer.MIN_VALUE));
JPanel jpanel2 = new JPanel();
jpanel2.setBackground(Color.black);
// JPanel jpanel3 = new JPanel();
// jpanel3.setBackground(Color.blue); Container conn = chuangkou.getContentPane();
conn.add(backlabel);
// conn.add(jpanel1,BorderLayout.SOUTH);
conn.add(jpanel2, BorderLayout.NORTH);
// conn.add(jpanel3, BorderLayout.CENTER);
JMenuBar caidanlan = new JMenuBar();
// caidanlan.setBorderPainted(falsh);
JMenu caidan = new JMenu("基础信息管理");
JMenu caidan1 = new JMenu("进货管理");
JMenu caidan2 = new JMenu("销售管理");
JMenu caidan3 = new JMenu("查询统计");
JMenu caidan4 = new JMenu("库存管理");
JMenu caidan5 = new JMenu("系统管理");
caidanlan.add(caidan);
caidanlan.add(caidan1);
caidanlan.add(caidan2);
caidanlan.add(caidan3);
caidanlan.add(caidan4);
caidanlan.add(caidan5);
chuangkou.setJMenuBar(caidanlan);
chuangkou.setSize(800, 600);
chuangkou.setVisible(true);
} public void uptupian() {
int backw = MyMun.this.chuangkou.getWidth();
int backh = chuangkou.getHeight();
backlabel = new JLabel(" <html> <body> <image width='" + backw
+ "'height='" + (backh) + "'src="
+ MyMun.this.getClass().getResource("a.jpg")
+ "'> </img> </body> </html>");
backlabel.setVerticalAlignment(SwingConstants.TOP);
backlabel.setHorizontalAlignment(SwingConstants.CENTER);
if (backlabel != null) {
backlabel.setSize(backw, backh);
} } static {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception e) {
e.printStackTrace();
}
} public static void main(String[] args) {
// TODO Auto-generated method stub new MyMun();
}}