技术标签: java 子窗口 swt
packagecom.swift;importjava.awt.BorderLayout;importjava.awt.Dimension;importjava.awt.EventQueue;importjava.awt.FlowLayout;importjavax.swing.ImageIcon;importjavax.swing.JButton;importjavax.swing.JDialog;importjavax.swing.JFrame;importjavax.swing.JLabel;importjavax.swing.JPanel;importjavax.swing.JScrollPane;importjavax.swing.JSplitPane;importjavax.swing.JTextArea;importjavax.swing.UIManager;importjavax.swing.UnsupportedLookAndFeelException;public class ChatFrame extendsJFrame {privateJTextArea textArea_1;privateJTextArea textArea;public static voidmain(String args[]) {
JFrame.setDefaultLookAndFeelDecorated(true);
JDialog.setDefaultLookAndFeelDecorated(true);try{
UIManager.setLookAndFeel("javax.swing.plaf.nimbus.NimbusLookAndFeel");
}catch(ClassNotFoundException e1) {//TODO Auto-generated catch block
e1.printStackTrace();
}catch(InstantiationException e1) {//TODO Auto-generated catch block
e1.printStackTrace();
}catch(IllegalAccessException e1) {//TODO Auto-generated catch block
e1.printStackTrace();
}catch(UnsupportedLookAndFeelException e1) {//TODO Auto-generated catch block
e1.printStackTrace();
}
EventQueue.invokeLater(newRunnable() {public voidrun() {try{
ChatFrame frame= newChatFrame();
frame.setVisible(true);
}catch(Exception e) {
e.printStackTrace();
}
}
});
}publicChatFrame() {super();
setTitle("飞燕—聊天窗");
setBounds(100, 100, 558, 576);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);final JPanel panel = newJPanel();
panel.setLayout(new BorderLayout(5,5));
getContentPane().add(panel, BorderLayout.NORTH);final JLabel label = new JLabel(new ImageIcon("Images/logo.jpg"));
panel.add(label, BorderLayout.WEST);
label.setText("New JLabel");
label.setPreferredSize(new Dimension(74,74));final JPanel panel_1 = newJPanel();
panel_1.setLayout(newBorderLayout());
panel.add(panel_1, BorderLayout.CENTER);final JLabel advancingSwiftLabel = newJLabel();
advancingSwiftLabel.setText("Advancing Swift");
panel_1.add(advancingSwiftLabel, BorderLayout.CENTER);final JLabel neverWasteTimeLabel = newJLabel();
neverWasteTimeLabel.setText("Never waste time any more");
panel_1.add(neverWasteTimeLabel, BorderLayout.SOUTH);final JSplitPane splitPane = newJSplitPane();
splitPane.setDividerLocation(300);
splitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
getContentPane().add(splitPane, BorderLayout.CENTER);final JPanel panel_2 = newJPanel();
panel_2.setLayout(newBorderLayout());
splitPane.setRightComponent(panel_2);final JPanel panel_3 = newJPanel();final FlowLayout flowLayout = newFlowLayout();
flowLayout.setAlignment(FlowLayout.LEFT);
panel_3.setLayout(flowLayout);
panel_2.add(panel_3, BorderLayout.NORTH);final JButton button = newJButton();
button.setText("字体");
panel_3.add(button);final JPanel panel_4 = newJPanel();final FlowLayout flowLayout_1 = newFlowLayout();
flowLayout_1.setAlignment(FlowLayout.RIGHT);
panel_4.setLayout(flowLayout_1);
panel_2.add(panel_4, BorderLayout.SOUTH);final JButton button_1 = newJButton();
button_1.setText("关闭");
panel_4.add(button_1);final JButton button_2 = newJButton();
button_2.setText("发送");
panel_4.add(button_2);final JScrollPane scrollPane = newJScrollPane();
panel_2.add(scrollPane, BorderLayout.CENTER);
textArea_1= newJTextArea();
scrollPane.setViewportView(textArea_1);final JScrollPane scrollPane_1 = newJScrollPane();
splitPane.setLeftComponent(scrollPane_1);
textArea= newJTextArea();
scrollPane_1.setViewportView(textArea);
}
}
文章浏览阅读386次,点赞7次,收藏10次。摘 要进入21世纪网络和计算机得到了飞速发展,并和生活进行了紧密的结合。目前,网络的运行速度以达到了千兆,覆盖范围更是深入到生活中的角角落落。这就促使二手交易网站的发展。二手交易网站可以实现远程购物,远程选择喜欢的商品和随时追踪订单的状态。二手交易网站给人们带来前所未有的体验,满足了新时代人们的购物需求,所以网上二手交易模式得到大力发展。本系统为基于Springboot的华强北商城二手手机管理系统,是采用计算机和网络技术进行开发的在线交易平台,可以实现商品的展示、购买、评价以及销售等。本系统采用Jav
文章浏览阅读63次。1.Vue.js基础语法1.1.Vue.js入门: <!--引入vue.min.js--> <script src="vue.min.js"></script> <div id="app"> <!-- 插值表达式 --> {{message}} </div> <script> new Vue({ el:'#..._vuejs前端log
文章浏览阅读699次。原文:http://bit1129.iteye.com/blog/2174673 本文包括如下内容:Spark History Server的作用 配置Spark History Server 运行Spark History Server 查看Spark程序的运行信息 Spark History Server的作用 在 运行Spark应用程序的时候,driver会提供一个webUI用于展_log directory specified does not exist: fi
文章浏览阅读707次。常用的代码片段,保存起来。/** * 保存对象 * * @param ser * @param file * @throws IOException */ public void saveObject(final Serializable ser, final String file) { new Thread(n_java软件文章如何存储
文章浏览阅读866次。如何才能降低Android应用程序的耗电量呢?今天再一次回顾了一下09年Google IO大会Jeffrey Sharkey的演讲(Coding for Life — Battery Life, That Is),与大家一起分享有效控制Android软件的耗电问题。AD: 51CTO在对尚邮架构师的访谈中曾经探讨过移动开发是否要重视移动终端软件的耗电问题_能有效控制安卓4.4.2耗电的软件是哪个
文章浏览阅读137次。每次写博客,第一句话都是这样的:程序员很苦逼,除了会写程序,还得会写博客!当然,希望将来的一天,某位老板看到此博客,给你的程序员职工加点薪资吧!因为程序员的世界除了苦逼就是沉默。我眼中的程序员大多都不爱说话,默默承受着编程的巨大压力,除了技术上的交流外,他们不愿意也不擅长和别人交流,更不乐意任何人走进他们的内心,他们常常一个人宅在家中!有上进心的,查查资料,学习新的知识,没上进心的,在家一日重复一..._c# 抽象方法与虚方法相结合事例
文章浏览阅读365次。首先要看自己的网址是不是htttp:localhost:“端口”(8080)/_ubuntu 配置好了localhost:2017连上了没法用
文章浏览阅读618次。原标题:系统:花粉俱乐部放出EMUI10/安卓10适配进度,有包括你的机型吗最新消息,华为在今日下午2019华为开发者大会上正式发布了EMUI 10和鸿蒙OS,其中EMUI 10已经确定将会在9.8日开启华为P30系列手机的Beta升级尝鲜。华为消费业务软件部总裁王成录表示,EMUI 10将会开启全场景智慧生活,其下一代的华为Mate系列也将首发搭载EMUI 10操作系统。相关阅读:系统:一张华为..._华为emui10下载
文章浏览阅读4.7k次。各式 Web 前端開發工具整理這裡收集了一系列各式各樣與「網頁前端」相關的開發工具、函式庫與參考文件,這些工具僅針對一般桌上型/筆記型電腦的顯示環境為主 (不含平板或手機等行動版網頁相關工具)。程式碼編寫工具 (Coding Tools)工作流程/建置/組合 (Workflow/Builds/Assemblers)lumbarbrunchgruntl_前端alant
文章浏览阅读9k次,点赞2次,收藏11次。但是name在以下用途是不能替代的:1. 表单(form)的控件名,提交的数据都用控件的name而不是id来控制。因为有许多name会同时对应多个控件,比如checkbox和radio,而id必须是全文档中唯一的。此外浏览器会根据name来设定发送到服务器的request。因此如果用id,服务器是无法得到数据的。2. frame和window的名字,用于在其他frame或window指定t..._input属性name和id的区别
文章浏览阅读2.3k次,点赞2次,收藏8次。资源下载链接: https://pan.baidu.com/s/1w5SzdQAvC3Bbh2FJzPEntw 提取码: fwmk里面的HDF可以不下载环境准备配置ssh 免密登录配置host文件关闭防火墙,关闭selinux配置aliyun 的yum源安装时钟同步yum install -y ntpsystemctl enable ntpd设置umaskecho uma..._hdplive1.0
文章浏览阅读819次,点赞20次,收藏8次。区间预测 | Matlab实现BiLSTM-Adaboost-ABKDE的集成双向长短期记忆网络自适应带宽核密度估计多变量回归区间预测_评价指标pinaw