zoukankan      html  css  js  c++  java
  • GUI 之 JScrollPane (面板)

    编写代码 JScrollDemo测试类

    package com.xiang.lesson05;
    
    import javax.swing.*;
    import java.awt.*;
    
    //滚动条 JScrollPane 面板
    public class JScrollDemo extends JFrame {
        public JScrollDemo() {
            Container container = getContentPane();
    
    //        文本域
            JTextArea textArea = new JTextArea(20, 10);
            textArea.setText("Machine reading comprehension (MRC) aims to teach machines to read and comprehend human
    " +
                    "languages, which is a long-standing goal of natural language processing (NLP). With the burst of
    " +
                    "deep neural networks and the evolution of contextualized language models (CLMs), the research
    " +
                    "of MRC has experienced two significant breakthroughs. MRC and CLM, as a phenomenon,
    " +
                    "have a great impact on the NLP community. In this survey, we provide a comprehensive and
    " +
                    "comparative review on MRC covering overall research topics about 1) the origin and development
    " +
                    "of MRC and CLM, with particular focus on the role of CLMs; 2) the impact of MRC and CLM
    " +
                    "to the NLP community; 3) the definition, datasets, and evaluation of MRC; 4) general MRC
    " +
                    "architecture and technical methods in the view of two-stage Encoder-Decoder solving archiu0002tecture from the insights of the cognitive process of humans; 5) previous highlights, emerging
    " +
                    "topics, and our empirical analysis, among which we especially focus on what works in different
    " +
                    "periods of MRC researches. We propose a full-view categorization and new taxonomies on these
    " +
                    "topics. The primary views we have arrived at are that 1) MRC boosts the progress from language
    " +
                    "processing to understanding; 2) the rapid improvement of MRC systems greatly benefits from
    " +
                    "the development of CLMs; 3) the theme of MRC is gradually moving from shallow text matching
    " +
                    "to cognitive reasoning.");
    
    //        JScrollPane 面板
            JScrollPane scrollPane = new JScrollPane(textArea);
    
    
            container.add(scrollPane);
    
            setVisible(true);
            setBounds(100, 100, 400, 200);
            setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    
        }
    
        public static void main(String[] args) {
            new JScrollDemo();
        }
    }
    
    

    运行结果

  • 相关阅读:
    VRRP(Virtual Router Redundancy Protocol)业界标准
    CISCO快速转发
    89、C++中将临时变量作为返回值时的处理过程
    87、C++函数调用的压栈过程
    82、类什么时候会析构?
    84、智能指针的原理、常用的智能指针及实现
    81、构造函数一般不定义为虚函数的原因
    80、构造函数析构函数可否抛出异常
    79、虚析构函数的作用,父类的析构函数是否要设置为虚函数?
    78、构造函数、析构函数的执行顺序?
  • 原文地址:https://www.cnblogs.com/d534/p/15111592.html
Copyright © 2011-2022 走看看