现在正在做java课程设计: 课设名称: 网络设备管理系统 数据信息:  路由器(名称编号,名称编号),PC(名称编号,接口类型) 
      用的数据库:  acess (需引入 API中的: sql.*;) 
      GUI 界面处理.(窗口: 标题栏,添加按钮,查找按钮,删除按钮,借用按钮,名称编号文本框,接口类型文本框,确定按钮,显示各种操作信息的文本框) 
      实现: 添加,查找,修改,删除,借用记录,这五项功能. 
      非常简单的... 
      现在主要困难是: 监视器比较陌生,各个器件之间的响应不清楚... 
      
    各位高手,给小弟我一些相关的源程序, 我在网上找了很多, 找不到相合适的... 
    给小弟我一些建议... 吧...谢谢... 
    已经做的如下: 
import java.awt.event.ActionEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.ActionListener;
import java.awt.event.WindowEvent;import java.awt.*;
import java.awt.event.*;import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JSplitPane;public class MainFrame extends JFrame {    private static final LayoutManager BoxLayout = null;    private static final int Y = 1;    JPanel pane1, pane2, pane3, pane4, pane5;    JButton button1, button2, button3, button4, button5;    Box boxV1;    CardLayout card;    BoxLayout box1;    MainFrame(String s) {
        super(s);        setContentPane(getSplitPane());
        setBounds(100, 100, 600, 450); // 设置窗口大小及离屏幕左上角的位置
        setVisible(true); // 根据参数的值显示或隐藏此组件,true表示显示,false则反之
        addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {
                setVisible(false);
                dispose(); // 释放由此Window及其子组件及其拥有的所有子组件所使用的所有本机屏幕资源
                System.exit(0);// 中断正在运行之中的java虚拟机,整形参数非零的状态码表示异常终止,零状态码表示正常终止整个程序
            }
        });
    }    JSplitPane getSplitPane() { // 返回当前包含此实例的拆分窗格
        JSplitPane splitpane = new JSplitPane();
        splitpane.setOneTouchExpandable(true);// 使 JSplitPane 在分隔条上提供一个 UI
        // 小部件来快速展开/折叠分隔条,此属性必须为true
        splitpane.setPreferredSize(new Dimension(500, 600));// 设置此组件的首选大小,如果
        // preferredSize为null,则要求
        // UI 提供首选大小
        splitpane.setOrientation(JSplitPane.HORIZONTAL_SPLIT);// 设置分隔窗格的方式
        splitpane.setDividerSize(5);// 设置分隔条的大小
        splitpane.setDividerLocation(90);// 将分隔条所处的最后位置设置为 newLastLocation
        splitpane.setLeftComponent(getLeftPanel());// 将组件设置到分隔条的左边
        splitpane.setRightComponent(getRightPanel());// 将组件设置到分隔条的右边        return splitpane;    }    JPanel getLeftPanel() {
        pane1 = new JPanel();
        box1 = new BoxLayout(pane1, Y);
        pane1.setLayout(box1);        button1 = new JButton("添加设备");
        button1.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                System.out.println("添加设备Button click");
            }
        });
        button2 = new JButton("删除设备");
        button2.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                System.out.println("删除设备Button click");
            }
        });
        button3 = new JButton("查找设备");
        button3.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                System.out.println("查找设备Button click");
            }
        });
        button4 = new JButton("修改设备");
        button4.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                System.out.println("修改设备JButton click");
            }
        });
        button5 = new JButton("借用设备");
        button5.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                System.out.println("借用设备JButton click");
            }
        });
        pane1.add(button1);
        pane1.add(button2);
        pane1.add(button3);
        pane1.add(button4);
        pane1.add(button5);        validate();
        return pane1;    }    JPanel getRightPanel() {
        card = new CardLayout();        pane2 = new JPanel();
        pane3 = new JPanel();
        pane4 = new JPanel();
        pane5 = new JPanel();        TextField text1, text2, text3;        return pane2;    }    public static void main(String[] args) {
        MainFrame win = new MainFrame("网络设备管理系统");    }
}谢谢了...给些具体的相关实例,或者帮助我修改修改... 谢谢...

解决方案 »

  1.   

    此回复为自动发出,仅用于显示而已,并无任何其他特殊作用
    楼主【cswudafeng】截止到2008-07-03 10:49:04的历史汇总数据(不包括此帖):
    发帖的总数量:28                       发帖的总分数:950                      
    结贴的总数量:22                       结贴的总分数:590                      
    无满意结贴数:2                        无满意结贴分:40                       
    未结的帖子数:6                        未结的总分数:360                      
    结贴的百分比:78.57 %               结分的百分比:62.11 %                  
    无满意结贴率:9.09  %               无满意结分率:6.78  %                  
    楼主加油
      

  2.   

    这个GUI已经很就没有做了。
      你随便下个学生管理系统,图书管理系统什么的,对应着看看就是了。
      

  3.   

    不要用swing啦,用eclipse的swtdesinger可以直接画