展开

关键词

JAVA学习Swing章节标签JLabel中图标的使用

package com.swing; import java.awt.Color; import java.awt.Component; import java.awt.Container; import java.awt.Graphics; import javax.swing.Icon; import javax.swing.JFrame; import javax.swing.JLabel; import jl=new JLabel("测试",icon,SwingConstants.CENTER); JFrame jf=new JFrame();//创建一个 package com.swing; import java.awt.Container; import java.net.URL; import javax.swing.Icon; import javax.swing.ImageIcon jl=new JLabel("这是一个JFrame窗体",JLabel.CENTER); //获取图片所在的URL URL url=MyImageIcon.class.getResource

42660

Java-单机版的书店管理系统(练习设计模块和思想_系列 三 )

jLabel1.setForeground(new java.awt.Color(204, 0, 0)); jLabel1.setText("\u6dfb\u52a0\u7528\u6237 "); add(jLabel1); jLabel1.setBounds(330, 30, 230, 80); jLabel2.setFont(new java.awt.Font "); add(jLabel1); jLabel1.setBounds(330, 30, 230, 80); jLabel2.setFont(new java.awt.Font "); add(jLabel1); jLabel1.setBounds(320, 30, 230, 80); jLabel2.setFont(new java.awt.Font .setFont(new java.awt.Font("Tahoma", 1, 48)); jLabel1.setForeground(new java.awt.Color(204, 0

15910
  • 广告
    关闭

    开发者专享福利,1988元优惠券限量发放

    带你体验博客、网盘相册搭建部署、视频渲染、模型训练及语音、文字识别等热门场景。云服务器低至65元/年,GPU15元起

  • 您找到你想要的搜索结果了吗?
    是的
    没有找到

    【3】JAVA---地址App小软件(AddPanel.class)(表现层)

    jlbmost4 = new javax.swing.JLabel(); jlbmost5 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); setPreferredSize(new java.awt.Dimension(800, 600)); setLayout (null); jLabel1.setFont(new java.awt.Font("Microsoft YaHei UI", 3, 48)); jLabel1.setForeground (new java.awt.Color(255, 51, 0)); jLabel1.setText("\u6dfb\u52a0\u5730\u5740\u4fe1\u606f"); add(jLabel1); jLabel1.setBounds(210, 20, 320, 90); jlbAddress.setFont(new java.awt.Font

    19710

    Java---网络蜘蛛-网页邮箱抓取器~源码

    ", 1, 24)); jLabel1.setForeground(new java.awt.Color(255, 0, 51)); jLabel1.setText("\ ); jLabel1.setBounds(30, 20, 350, 70); jLabel2.setFont(new java.awt.Font("Dialog", 1 (jLabel2); jLabel2.setBounds(20, 190, 110, 30); tfdUrl.setFont(new java.awt.Font("Dialog ().add(jLabel3); jLabel3.setBounds(20, 100, 70, 30); tfdTime.setFont(new java.awt.Font .setFont(new java.awt.Font("Dialog", 0, 11)); jLabel4.setText("\u5373\u641c\u7d22\u7f51\u9875

    11110

    【6】JAVA---地址App小软件(QueryPanel.class)(表现层)

    = new javax.swing.JLabel(); setMinimumSize(new java.awt.Dimension(800, 600)); setLayout (null); jLabel2.setFont(new java.awt.Font("Microsoft YaHei UI", 3, 48)); jLabel2.setForeground (new java.awt.Color(255, 51, 0)); jLabel2.setText("\u67e5\u627e\u5730\u5740\u4fe1\u606f"); add(jLabel2); jLabel2.setBounds(230, 20, 330, 90); jlbName1.setFont(new java.awt.Font jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JButton jbtnFind; private

    23210

    Java-单机版的书店管理系统(练习设计模块和思想_系列 七 )

    600)); setLayout(null); jLabel1.setFont(new java.awt.Font("微软雅黑", 1, 36)); jLabel1 add(jLabel1); jLabel1.setBounds(290, 10, 170, 70); jLabel5.setFont(new java.awt.Font .setFont(new java.awt.Font("微软雅黑", 0, 18)); jLabel7.setText("\u8fdb\u8d27\u5355\u7f16\u53f7:" , 320, 200, 30); jLabel12.setFont(new java.awt.Font("微软雅黑", 0, 18)); jLabel12.setText .setBounds(510, 400, 200, 30); jLabel15.setFont(new java.awt.Font("微软雅黑", 0, 18)); jLabel15

    15110

    线程 Runnable接口

    package defaul; import java.awt.Component; import java.awt.Container; import java.awt.Graphics; import java.io.IOException; import java.net.URL; import java.nio.CharBuffer; import java.util.concurrent.CountDownLatch ; import javax.swing.SwingConstants; public class T extends JFrame implements Runnable{ private JLabel jLabel = new JLabel(); private int count = 0; private Container container = getContentPane(); public (icon); jLabel.setVerticalAlignment(SwingConstants.NORTH); jLabel.setBounds(0,0,500,50); container.add

    32840

    图书管理系统代码 9 EditpassW (…

    import java.awt.BorderLayout; import java.awt.FlowLayout; import java.awt.GridBagLayout ; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.util.ArrayList; import javax.swing.ImageIcon

    16220

    图书管理系统代码 6 AboutFrame (…

    import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import java.awt.FlowLayout ; import java.awt.Font; import java.awt.Graphics; import java.awt.GridBagLayout; import java.awt.GridLayout ; import java.awt.Image; import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.ActionListener javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel lb1; private JLabel lb2; private JLabel lb3; private JLabel lb4; Color FG1 = Color.RED; Color

    12320

    Java-单机版的书店管理系统(练习设计模块和思想_系列 六 )

    (null); jLabel1.setFont(new java.awt.Font("微软雅黑", 1, 48)); jLabel1.setForeground(new java.awt.Color(204, 0, 0)); jLabel1.setText("\u8fdb\u8d27\u5217\u8868"); add(jLabel1 jLabel1.setForeground(new java.awt.Color(204, 0, 0)); jLabel1.setText("\u6dfb\u52a0\u8fdb\u8d27 "); add(jLabel1); jLabel1.setBounds(270, 0, 210, 60); jLabel4.setFont(new java.awt.Font jLabel5.setBounds(10, 220, 140, 30); jLabel6.setFont(new java.awt.Font("微软雅黑", 0, 18

    16610

    Java基础-25(05)图形用户界面编程GUI

    = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jtfUsername = new javax.swing.JTextField (new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent ex) { // java.util.logging.Logger.getLogger(RegistFrame.class.getName()).log(java.util.logging.Level.SEVERE ex) { // java.util.logging.Logger.getLogger(RegistFrame.class.getName()).log(java.util.logging.Level.SEVERE jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JPasswordField jpfPassword;

    52840

    Java-单机版的书店管理系统(练习设计模块和思想_系列 四(2) )

    .setFont(new java.awt.Font("Dialog", 1, 48)); jLabel1.setForeground(new java.awt.Color(204, 0 "); add(jLabel1); jLabel1.setBounds(270, 30, 230, 80); jLabel2.setFont(new java.awt.Font "); add(jLabel1); jLabel1.setBounds(260, 30, 230, 80); jLabel2.setFont(new java.awt.Font "); add(jLabel1); jLabel1.setBounds(250, 20, 230, 80); jLabel2.setFont(new java.awt.Font "); add(jLabel1); jLabel1.setBounds(250, 30, 230, 80); jLabel2.setFont(new java.awt.Font

    9210

    java实现数据库的增删改查

    ("姓名"); number=new JLabel("学号"); age=new JLabel("年龄"); sex=new JLabel("性别"); post=new JLabel("职位"); wage=new JLabel("工资"); jop=new JLabel("地点"); ("姓名"); number=new JLabel("学号"); age=new JLabel("年龄"); sex=new JLabel ("性别"); post=new JLabel("职位"); wage=new JLabel("工资"); jop=new JLabel sex=new JLabel("性别"); post=new JLabel("职位"); wage=new JLabel("工资");

    15830

    文件切割合并器 2 切割类 Split

    import java.awt.BorderLayout; import java.awt.GridBagLayout; import java.awt.event.ActionEvent ; import java.awt.event.ActionListener; import java.awt.event.FocusEvent; import java.awt.event.FocusListener ; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException ; import java.io.FileOutputStream; import java.io.IOException; import java.util.Properties label_result = new JLabel("打开目标目录失败!!")

    11020

    Java实现的打地鼠游戏

    import java.awt.Cursor; import java.awt.Image; import java.awt.Point; import java.awt.Toolkit ; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseEvent ; import java.awt.event.MouseListener; import java.util.Random; import javax.swing.ImageIcon /images/";//图片目录,当前工程下 JLabel jlbMouse;//地鼠 Timer timer;//时间定时器 Random random;//随机数对象 ImageIcon bgImage = new ImageIcon("images/beijing.jpg"); JLabel bgLabel = new JLabel(bgImage

    29000

    Java实现扫雷小游戏三

    接下来是完成菜单栏的功能 游戏菜单 添加菜单监听器(com.panel/BombJMenuBar.java) 在init()方法中插入 // 开局事件处理 menuItemStart.addActionListener equals("关于扫雷(A)")){ new About(mainframe); } } } 注意:在雷区BombJPanel.java = new MineLabel[Tools.rows][Tools.cols]; 运行效果: image.png image.png 自定义菜单项(com.dialog/UserDefined.java jPanel.add(panel); return jPanel; } } 自定义窗口监听器(com.listener/UserDefinedListener.java mainFrame.reStartGame(); } } } 运行效果: image.png 英雄榜 弹出胜利窗口(com.dialog/Win.java

    12640

    Java-单机版的书店管理系统(练习设计模块和思想_系列 四(1) )

    ); jLabel1.setFont(new java.awt.Font("微软雅黑", 1, 48)); jLabel1.setForeground(new java.awt.Color ); jLabel1.setFont(new java.awt.Font("微软雅黑", 1, 48)); jLabel1.setForeground(new java.awt.Color (new java.awt.Font("微软雅黑", 0, 18)); jLabel3.setText("uuid:"); add(jLabel3); jLabel3 (new java.awt.Font("微软雅黑", 0, 18)); jLabel3.setText("uuid:"); add(jLabel3); jLabel3 ); jLabel1.setFont(new java.awt.Font("微软雅黑", 1, 48)); jLabel1.setForeground(new java.awt.Color

    17220

    图书管理系统代码  1 Libraryload …

    import java.awt.BorderLayout; import java.awt.Color; import java.awt.FlowLayout; import java.awt.GridBagLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener ; import java.awt.event.FocusEvent; import java.awt.event.FocusListener; import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import javax.swing.ImageIcon

    13430

    文件切割合并器 5 关于类

    import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Font; import java.awt.GridBagLayout; import java.awt.Image ; import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.ActionListener (f1); lb4 = new JLabel("1.0.0"); lb4.setForeground(FG2); lb4.setFont(f2); //添加标签 lb1; private JLabel lb2; private JLabel lb3; private JLabel lb4; Color FG1 = Color.RED

    9210

    【5】JAVA---地址App小软件(DeletePanel.class)(表现层)

    (); jlbxingbie = new javax.swing.JLabel(); jlbAge = new javax.swing.JLabel(); jlbDianhau = new javax.swing.JLabel(); jlbAddress = new javax.swing.JLabel(); jtfAddress (800, 600)); setLayout(null); jLabel2.setFont(new java.awt.Font("Microsoft YaHei UI" , 3, 48)); jLabel2.setForeground(new java.awt.Color(255, 51, 0)); jLabel2.setText("\u5220 \u9664\u5730\u5740\u4fe1\u606f"); add(jLabel2); jLabel2.setBounds(230, 20, 330, 90);

    12110

    扫码关注腾讯云开发者

    领取腾讯云代金券