zoukankan      html  css  js  c++  java
  • 拆分窗口

     1 package Layout;
     2 import java.awt.*;
     3 import javax.swing.*;
     4 public class SplitWindow extends JFrame {
     5 private String str[] = {"软件开发","平面设计","动画制作","室内设计"};
     6 private JList lb = new JList(str);
     7 private JLabel bq = new JLabel(new ImageIcon("photo/psb.jpg"));
     8 private JSplitPane cf = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,lb,bq);//  左右拆分
     9 //private JSplitPane cf = new JSplitPane(JSplitPane.VERTICAL_SPLIT,lb,bq);//  上下拆分
    10 public SplitWindow(){
    11     
    12     cf.setOneTouchExpandable(true);
    13     this.add(cf);
    14     this.setTitle("用户界面");
    15     this.setSize(600, 500);
    16     this.setLocation(100, 100);
    17     this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    18     this.setVisible(true);
    19 }
    20     public static void main(String[] args) {
    21     
    22    SplitWindow l = new SplitWindow();
    23     }
    24 
    25 }
  • 相关阅读:
    简介&目录
    Lucas 定理
    扩展欧几里得算法(exgcd)
    【做题记录】CF23B Party
    【做题记录】CF1375D Replace by MEX
    【做题记录】CF194B Square
    SPFA
    dijkstra
    CSP-J&S 2020 游记
    中国剩余定理(CRT)
  • 原文地址:https://www.cnblogs.com/the-wang/p/6752929.html
Copyright © 2011-2022 走看看