zoukankan      html  css  js  c++  java
  • 控件绝对定位函数


    审美布局能力实在太差。驾驭不了这种界面美化函数,弃疗了。、调了好久才出来下面这个玩意,以后再也不瞧不起美工了。。。




    <span style="font-size:18px;">//祭上代码
    import java.awt.FlowLayout ;
    import javax.swing.JFrame ;
    import javax.swing.JButton ;
    import javax.swing.JLabel ;
    import javax.swing.JTextArea ;
    import java.awt.*;
    
    class Tester{
        public static void main(String args[]){
            JFrame frame = new JFrame("记事本") ;
            frame.setLayout(null) ;
            JTextArea ta = new JTextArea(20,20) ;
            JButton open = new JButton("打开") ;
            JButton newF = new JButton("新建") ;
            JButton help = new JButton("帮助") ;
            frame.setSize(400,300) ;
            //title.setBounds(45,5,150,20) ; 
            open.setBounds(0,0,60,20) ;
            newF.setBounds(60,0,60,20) ;
            help.setBounds(100,0,60,20) ;
            ta.setBounds(5,40,400,200) ;
            frame.add(open) ;
            frame.add(newF) ;
            frame.add(help) ;
            frame.add(ta) ;
            frame.setVisible(true) ;
        }
    };
    
    </span>


  • 相关阅读:
    STM32学习中出现的错误
    原码 反码 补码 移码
    LiauidCrystal
    gpio 的配置
    ARM7探究
    导轨控制问题
    A4988驱动42步进电机
    arduino驱动oled
    计算机组成原理
    arduino basic issue
  • 原文地址:https://www.cnblogs.com/emoji/p/4436797.html
Copyright © 2011-2022 走看看