admin 管理员组

文章数量: 1087675


2024年1月13日发(作者:java中public的用法)

public void run() { try { MainFrame frame = new MainFrame(); ible(true); } catch (Exception e) { tackTrace(); } } }); } /** * Create the frame. */ public MainFrame() {

//改变系统默认字体 Font font = new Font("Dialog", , 12); ation keys = aults().keys(); while (eElements()) { Object key = ement(); Object value = (key); if (value instanceof Resource) { (key, font); } }

setTitle("u56FEu4E66u7BA1u7406u7CFBu7EDFu4E3Bu754Cu9762"); setDefaultCloseOperation(_ON_CLOSE); setBounds(100, 100, 450, 300);

JMenuBar menuBar = new JMenuBar(); lTipText(""); setJMenuBar(menuBar);

JMenu menu = new JMenu("u57FAu672Cu6570u636Eu7EF4u62A4 "); n(new ImageIcon(ource("/images/"))); (menu);

JMenu mnNewMenu = new JMenu("u56FEu4E66u7C7Bu522Bu7BA1u7406 "); n(new ImageIcon(ource("/images/"))); (mnNewMenu);

//图书类别添加 JMenuItem menuItem = new JMenuItem("u56FEu4E66u7C7Bu522Bu6DFBu52A0"); ionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { BookTypeAddInterFrame bookTypeAddInterFrame=new BookTypeAddInterFrame(); ible(true); (bookTypeAddInterFrame); } }); n(new ImageIcon(ource("/images/"))); (menuItem);

//图书类别维护 JMenuItem menuItem_1 = new JMenuItem("u56FEu4E66u7C7Bu522Bu7EF4u62A4"); menuItem_ionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { BookTypeManageInterFrame bookTypeManageInterFrame=new BookTypeManageInterFrame(); ible(true); (bookTypeManageInterFrame); } }); menuItem_n(new ImageIcon(ource("/images/")));

} catch (Exception e) { tackTrace(); } } }); } /** * Create the frame. */ public BookTypeManageInterFrame() {

//改变系统默认字体 Font font = new Font("Dialog", , 12); ation keys = aults().keys(); while (eElements()) { Object key = ement(); Object value = (key); if (value instanceof Resource) { (key, font); } } setIconifiable(true); setClosable(true); setTitle("图书类别管理"); setBounds(400, 100, 535, 489);

JScrollPane scrollPane = new JScrollPane();

JLabel label = new JLabel("图书类别名称:");

s_bookTypeNameText = new JTextField(); s_umns(10);

//查询按钮 JButton searchBtn = new JButton("查询"); ionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { searchActionPerformed(e); } }); n(new ImageIcon(ource("/images/")));

JPanel panel = new JPanel(); der(new TitledBorder(null, "u8868u5355u64CDu4F5C", G, , null, null)); GroupLayout groupLayout = new GroupLayout(getContentPane()); izontalGroup( ParallelGroup(G) .addGroup(SequentialGroup() .addGap(56) .addComponent(label) .addPreferredGap(TED) .addComponent(s_bookTypeNameText, RED_SIZE, 167, RED_SIZE) .addPreferredGap(D, 54, _VALUE) .addComponent(searchBtn) .addGap(71)) .addGroup(SequentialGroup() .addGap(36) .addGroup(ParallelGroup(NG, false) .addComponent(panel, G, T_SIZE, T_SIZE, _VALUE) .addComponent(scrollPane, G)) .addContainerGap(31, _VALUE)) ); ticalGroup( ParallelGroup(G) .addGroup(SequentialGroup()

.addGroup(SequentialGroup() .addGap(27) .addGroup(ParallelGroup(NE) .addComponent(searchBtn) .addComponent(label) .addComponent(s_bookTypeNameText, RED_SIZE, T_SIZE, RED_SIZE)) .addGap(18) .addComponent(scrollPane, RED_SIZE, 167, RED_SIZE) .addGap(18) .addComponent(panel, T_SIZE, 194, _VALUE) .addContainerGap()) );

JLabel label_1 = new JLabel("编号:");

idText = new JTextField(); table(false); umns(10);

JLabel label_2 = new JLabel("图书类别名称:");

bookTypeNameText = new JTextField(); umns(10);

JLabel label_3 = new JLabel("描述:");

bookTypeDescText = new JTextArea();

//修改按钮 JButton modifyBtn = new JButton("修改"); ionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { bookTypeUpdateActionPerformed(e); } }); n(new ImageIcon(ource("/images/")));

//删除按钮 JButton deleteBtn = new JButton("删除"); ionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { bookTypeDeleteActionPerformed(e); } }); n(new ImageIcon(ource("/images/"))); GroupLayout gl_panel = new GroupLayout(panel); gl_izontalGroup( gl_ParallelGroup(G) .addGroup(gl_SequentialGroup() .addGap(19) .addGroup(gl_ParallelGroup(NG) .addGroup(G, gl_SequentialGroup() .addComponent(label_1) .addPreferredGap(D) .addComponent(idText, RED_SIZE, 47, RED_SIZE) .addGap(18) .addComponent(label_2) .addPreferredGap(TED) .addComponent(bookTypeNameText, RED_SIZE, 166, RED_SIZE)) .addGroup(G, gl_SequentialGroup() .addComponent(label_3) .addPreferredGap(D) .addComponent(bookTypeDescText)) .addGroup(gl_SequentialGroup() .addComponent(modifyBtn) .addGap(54)

private JButton resetBtn; //添加按钮 private JButton addBtn; //图书类别数据库访问对象 private BookTypeDao bookTypeDao; /** * Launch the application. */ public static void main(String[] args) { Later(new Runnable() { public void run() { try { BookTypeAddInterFrame frame = new BookTypeAddInterFrame(); ible(true); } catch (Exception e) { tackTrace(); } } }); } /** * Create the frame. */ public BookTypeAddInterFrame() { //改变系统默认字体 Font font = new Font("Dialog", , 12); ation keys = aults().keys(); while (eElements()) { Object key = ement(); Object value = (key); if (value instanceof Resource) { (key, font); } } setClosable(true); setIconifiable(true); setTitle("图书类别添加"); setBounds(100, 100, 487, 342);

JLabel label = new JLabel("图书类别名称:");

bookTypeNameText = new JTextField(); umns(10);

JLabel label_1 = new JLabel("图书类别描述:");

bookTypeDescText = new JTextArea();

//添加按钮 addBtn = new JButton("添加"); ionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { addActionPerformed(e); } }); //重置按钮 resetBtn = new JButton("重置"); ionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { resetActionPerformed(e); } }); GroupLayout groupLayout = new GroupLayout(getContentPane()); izontalGroup( ParallelGroup(G)

import Listener;import Event;import dapter;import vent;public class BookManageInterFrame extends JInternalFrame { private JTextField s_bookNameText; private JTextField s_authorText; private JTable bookTable; private JComboBox s_bookTypecomboBox; private BookTypeDao bookTypeDao; private BookDao bookDao; private JTextField idText; private JTextField bookNameText; private JTextField priceText; private JTextField authorText; private JTextField bookDescText; private final ButtonGroup buttonGroup = new ButtonGroup(); private JComboBox bookTypeComboBox; private JRadioButton maleBtn; private JRadioButton femaleBtn; /** * Launch the application. */ public static void main(String[] args) { Later(new Runnable() { public void run() { try { BookManageInterFrame frame = new BookManageInterFrame(); ible(true); } catch (Exception e) { tackTrace(); } } }); } /** * Create the frame. */ public BookManageInterFrame() {

//改变系统默认字体 Font font = new Font("Dialog", , 12); ation keys = aults().keys(); while (eElements()) { Object key = ement(); Object value = (key); if (value instanceof Resource) { (key, font); } }

setIconifiable(true); setClosable(true); setTitle("图书管理 "); setBounds(100, 100, 767, 528);

JPanel panel = new JPanel(); der(new TitledBorder(null, "搜索条件", G, , null, null));

JScrollPane scrollPane = new JScrollPane();

JPanel panel_1 = new JPanel(); panel_der(new TitledBorder(null, "表单操作", G, , null, null)); GroupLayout groupLayout = new GroupLayout(getContentPane());

} }); n(new ImageIcon(ource("/images/")));

//删除按钮 JButton deleteBtn = new JButton("删除"); ionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { deleteBookActionPerformed(e); } }); n(new ImageIcon(ource("/images/"))); GroupLayout gl_panel_1 = new GroupLayout(panel_1); gl_panel_izontalGroup( gl_panel_ParallelGroup(NG) .addGroup(gl_panel_SequentialGroup() .addGap(44) .addGroup(gl_panel_ParallelGroup(G, false) .addGroup(gl_panel_SequentialGroup() .addComponent(label_8) .addPreferredGap(D) .addComponent(bookDescText)) .addGroup(gl_panel_SequentialGroup() .addGroup(gl_panel_ParallelGroup(NG) .addComponent(label_2) .addComponent(label_5)) .addPreferredGap(TED) .addGroup(gl_panel_ParallelGroup(G, false) .addComponent(priceText) .addComponent(idText, T_SIZE, 86, _VALUE)) .addGap(37) .addGroup(gl_panel_ParallelGroup(G, false) .addGroup(gl_panel_SequentialGroup() .addComponent(label_3) .addPreferredGap(D) .addComponent(bookNameText, RED_SIZE, 136, RED_SIZE)) .addGroup(gl_panel_SequentialGroup() .addComponent(label_6) .addPreferredGap(D) .addComponent(authorText))) .addGap(35) .addGroup(gl_panel_ParallelGroup(G) .addGroup(gl_panel_SequentialGroup() .addComponent(label_4) .addPreferredGap(TED) .addComponent(maleBtn) .addGap(18) .addComponent(femaleBtn)) .addGroup(gl_panel_SequentialGroup() .addComponent(label_7) .addPreferredGap(TED) .addComponent(bookTypeComboBox, RED_SIZE, 97, RED_SIZE))))) .addContainerGap(34, _VALUE)) .addGroup(gl_panel_SequentialGroup() .addContainerGap(201, _VALUE) .addComponent(modifyBtn) .addGap(104) .addComponent(deleteBtn) .addGap(190)) ); gl_panel_ticalGroup( gl_panel_ParallelGroup(G) .addGroup(gl_panel_SequentialGroup() .addContainerGap() .addGroup(gl_panel_ParallelGroup(NE) .addComponent(maleBtn)

}); n(new ImageIcon(ource("/images/"))); // 图书重置按钮 JButton resetBtn = new JButton("重置"); ionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { bookResetActionPerformed(e); } }); n(new ImageIcon(ource("/images/"))); GroupLayout groupLayout = new GroupLayout(getContentPane()); groupLayout .setHorizontalGroup(ParallelGroup(G) .addGroup(SequentialGroup().addGap(38).addGroup(groupLayout .createParallelGroup( G) .addGroup( SequentialGroup().addGap(6).addGroup(groupLayout .createParallelGroup(G, false) .addGroup(SequentialGroup().addGroup(groupLayout .createParallelGroup(G, false) .addGroup(SequentialGroup() .addComponent(label_4).addPreferredGap( D) .addComponent(bookTypeComboBox, 0, T_SIZE, _VALUE)) .addGroup(SequentialGroup() .addComponent(label) .addPreferredGap(D) .addComponent(bookNameText, RED_SIZE, 116, RED_SIZE)) .addGroup(SequentialGroup() .addComponent(label_2) .addPreferredGap(D) .addComponent(maleBtn) .addPreferredGap(TED) .addComponent(femaleBtn))) .addGap(44) .addGroup(groupLayout .createParallelGroup(G, false) .addGroup(SequentialGroup() .addComponent(label_3) .addPreferredGap(TED) .addComponent(priceText)) .addGroup(SequentialGroup() .addComponent(label_1) .addPreferredGap(D) .addComponent(authorText, RED_SIZE, 128, RED_SIZE)))) .addGroup(SequentialGroup().addComponent(label_5) .addPreferredGap(D) .addComponent(bookDescText))) .addPreferredGap(D, 164, _VALUE)) .addGroup(SequentialGroup().addGap(94).addComponent(addBtn).addGap(96) .addComponent(resetBtn))) .addContainerGap())); ticalGroup(ParallelGroup(G) .addGroup(SequentialGroup().addGap(32) .addGroup(ParallelGroup(NE).addComponent(label) .addComponent(bookNameText, RED_SIZE, T_SIZE, RED_SIZE) .addComponent(label_1).addComponent(authorText, RED_SIZE, T_SIZE, RED_SIZE)) .addGap(31)


本文标签: 图书 类别 按钮 默认

更多相关文章

点击外部浏览器的按钮跳转到微信app打开网站任意url

9月前

免费代码联系我QQ:3220192183 再次跳转

ExtJs怎么才能点击一个按钮后,重新打开一个浏览器窗口?

9月前

ExtJs怎么才能点击一个按钮后,重新打开一个浏览器窗口?5 如题。希望大家帮帮我。 JavaScript Ajax ExtJS  2012年6月07日 08:52 ygyz03  2  0  0

微信公众号,点击按钮打开pdf文件流,安卓跳转到浏览器里下载,ios可预览但默认不能下载

9月前

微信公众号,点击按钮打开pdf文件流,安卓跳转到浏览器里下载,ios可预览但默认不能下载 注:在pc上开始时采用这两种方式是没有效果的&#xff

微信公众号关闭选择 ,复制链接、在浏览器打开的按钮

9月前

在页面中只需引用下面代码就可以取掉复制等 function onBridgeReady() {WeixinJSBridge.call(hideOptionMenu);}if (typeof WeixinJSBridge"un

【解决方法】PPT不能编辑,按钮都是灰色,怎么办?

9月前

PPT文件打开之后,发现无法编辑,再仔细查看发现工具栏中的功能按钮都是灰色的,无法使用,这是什么原因?该如何解决&#xff

android电话按钮无响应,华为手机死机、按键无响应怎么办? 华为手机死机无响应解决方法...

9月前

手机死机、卡死、按键无响应的时候您着急,咱先解决了问题再寻找手机卡死的原因。 华为手机死机无响应解决方法 一、卡顿等待无结果,先重启! 大家都会吧!长按

Ubuntu窗口过大?按钮都点不到怎么办?

9月前

Ubuntu有些应用程序设计bug,窗口没法调节合适的比例,比如窗口没有确认键,拖动窗口也拖不出来 按住AltF7 这时移动鼠标,就可以随意拖动窗口了

windows jar包按钮启动和开机自启两种方式实现

7月前

第一种 按钮启动 jar文件 放到 D 盘根目录下,或自定义。 新建 启动.bat,位置随便,最好放到桌面,内容如下: start javaw -jar D:plc-xz-0.0.1-SNAPSHOT.jar start D:1.vb

windows7设置任务栏按钮【从不合并】并且【隐藏标签】的方法

7月前

问题: 右击任务栏,选择属性,可以设置任务栏按钮,有“当任务栏被占满时合并”、“始终合并、隐藏标签”和“从不合并”。设置任务栏按钮为始终合并&

ptcalc使用方法

6月前

年月日发(作者:推送视频流)使用方法是一款简单实用的计算器工具,可用于进行二进制、八进制、十进制和十六进制的转换计算。本文将介绍如何正确使用来进行各种进制的计算。一、安装和启动.在计算机上搜索,并进入官方网站下载的安装程序。.双击安装程序并

全国计算机等级考试二级Visual+Basic语言程序设计真题精选2(含答案

6月前

年月日发(作者:数据同步报错)全国计算机等级考试二级语言程序设计真题精选一、单项选择题.软件设计中模块划分应遵循的准则是()。.低内聚低耦合.高内聚低耦合.低内聚高耦合.高内聚高耦合解析:软件设计中,模块划分应遵循的准则是高内聚低耦合、模块

二级MS+Office高级应用模拟71

6月前

年月日发(作者:扩展码对照表)二级高级应用模拟一、选择题、设栈的存储空间为(:),初始状态为。经过一系列入栈与退栈操作后,。现又在栈中退出一个元素后,栈顶指针值为______。...-.产生栈空错误、以下所列是正确的地址的是______。.

thinkpad部分按钮失灵

5月前

更新: 下面步骤后一周, 按键又失灵了, 还是更换了硬件. 问题描述 我的thinkpad e14 gen2 突然部分键盘按钮失灵,包括G,H,’,es

图书推荐 | 鸿蒙HarmonyOS应用开发从入门到精通(文末免费送书)

5月前

1、HarmonyOS鸿蒙系统与应用程序开发 HarmonyOS鸿蒙系统是继苹果iOS、谷歌Andriod之后的第三大手机操作系统,目前在华为手机等多个终端设备上得到了广泛的使用。HarmonyOS不仅仅是手机操作系统

AI图书推荐:使用GitHub Copilot和ChatGPT辅助的Python编程

5月前

使用Python编写计算机程序变得更加简单了!使用像GitHub Copilot和ChatGPT这样的AI辅助编码工具,将你的想法快速转化为应用程序。人工智能已经改变了我们编写计算机程序的方式。有

kotlin设置按钮不可点击_怎么使用手机对路由器进行设置

5月前

对于无线网络的需求越来越广泛,无线路由器成了家庭中的必备电器设置。 通常使用电脑对路由器进行设置,那么怎么用手机对路由器进行设置呢? 路由器连接电源开机&#xff0c

Eclipse debug模式:调试按钮、调试快捷键不可用解决办法

4月前

debug模式进入后,debug的几个按钮置灰,F5,6,8,没有任何反应: 1、退出 Eclipse.2、打开 Eclipse 目录下的 configuration 下

在移动端实现在浏览器网页点击按钮并复制文字(且测试打开微信APP)

4月前

在IOS手机上测试了以下的浏览器、链接等: 打不开微信:百度浏览器,搜狗浏览器,搜狗搜索,在钉钉点开链接 打得开微信&

浏览器在线PDF预览取消下载按钮

3月前

业务场景:需要在线PDF下载的功能,刚开始用的是第三方的PDF.JS,按照网上的方法操作,排查,发现没有作用,经过和后端小伙伴沟通,原来这个地址是浏览器PDF预览。 目录 浏览器PDF取消办法: 在需要URL地址后边加上代码 P

新装Ubuntu系统,窗口过大,无法拖动,按钮都点不到怎么办?

3月前

新装Ubuntu系统,窗口过大,无法拖动,按钮都点不到怎么办? 新装Ubuntu系统,有时候比例过大,无法

发表评论

全部评论 0
暂无评论