learning java ATW ScrollPane

import java.awt.*;

public class ScrollPaneTest {
    public static void main(String[] args) {
        var f = new Frame("测试窗口");

        var sp = new ScrollPane(ScrollPane.SCROLLBARS_ALWAYS);

        sp.add(new TextField(20));
        sp.add(new Button("click"));

        f.add(sp);

        f.setBounds(30,30,300,500);

        f.setVisible(true);

    }
}

result:

posted @ 2019-07-30 09:19  嵌入式实操  阅读(265)  评论(0编辑  收藏  举报