Eclipse Design 翻译下

qq_1849018727 2017-11-07 05:19:28
package com.java.view;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JLabel;
import javax.swing.LayoutStyle.ComponentPlacement;
import javax.swing.JTextField;
import javax.swing.JPasswordField;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import com.jgoodies.forms.factories.DefaultComponentFactory;

public class LogOnFrm extends JFrame {

private JPanel contentPane;
private JTextField userName;
private JPasswordField password;
/**
* @wbp.nonvisual location=-403,267
*/
private final JLabel label = DefaultComponentFactory.getInstance().createTitle("New JGoodies title");

/**
* Launch the application.
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
LogOnFrm frame = new LogOnFrm();
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}

/**
* Create the frame.
*/
public LogOnFrm() {
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 450, 300);
contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);

JLabel label = new JLabel("\u7BA1\u7406\u5458\u767B\u5F55");

JLabel label_1 = new JLabel("");

JLabel lblNewLabel_1 = new JLabel("\u5BC6\u7801");

JLabel lblNewLabel_2 = new JLabel("\u8D26\u53F7");

userName = new JTextField();
userName.setColumns(10);

password = new JPasswordField();

JButton jb_logon = new JButton("\u767B\u5F55");

JButton jb_reset = new JButton("\u91CD\u7F6E");
jb_reset.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {

}
});
GroupLayout gl_contentPane = new GroupLayout(contentPane);
gl_contentPane.setHorizontalGroup(
gl_contentPane.createParallelGroup(Alignment.LEADING)
.addGroup(gl_contentPane.createSequentialGroup()
.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)
.addGroup(gl_contentPane.createSequentialGroup()
.addGap(78)
.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)
.addGroup(gl_contentPane.createSequentialGroup()
.addComponent(lblNewLabel_2)
.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)
.addGroup(gl_contentPane.createSequentialGroup()
.addGap(88)
.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)
.addComponent(label)
.addComponent(label_1)))
.addGroup(gl_contentPane.createSequentialGroup()
.addGap(18)
.addComponent(userName, GroupLayout.PREFERRED_SIZE, 110, GroupLayout.PREFERRED_SIZE))))
.addGroup(gl_contentPane.createSequentialGroup()
.addComponent(lblNewLabel_1)
.addGap(18)
.addComponent(password, GroupLayout.PREFERRED_SIZE, 121, GroupLayout.PREFERRED_SIZE))))
.addGroup(gl_contentPane.createSequentialGroup()
.addGap(111)
.addComponent(jb_logon)
.addGap(49)
.addComponent(jb_reset)))
.addGap(78))
);
gl_contentPane.setVerticalGroup(
gl_contentPane.createParallelGroup(Alignment.LEADING)
.addGroup(gl_contentPane.createSequentialGroup()
.addContainerGap()
.addComponent(label)
.addGap(43)
.addGroup(gl_contentPane.createParallelGroup(Alignment.TRAILING)
.addComponent(label_1)
.addGroup(gl_contentPane.createParallelGroup(Alignment.BASELINE)
.addComponent(lblNewLabel_2)
.addComponent(userName, GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE)))
.addGap(57)
.addGroup(gl_contentPane.createParallelGroup(Alignment.BASELINE)
.addComponent(lblNewLabel_1)
.addComponent(password, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(ComponentPlacement.RELATED, 36, Short.MAX_VALUE)
.addGroup(gl_contentPane.createParallelGroup(Alignment.BASELINE)
.addComponent(jb_logon)
.addComponent(jb_reset))
.addGap(26))
);
contentPane.setLayout(gl_contentPane);
}
}

...全文
183 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
吉普赛的歌 版主 2017-11-07
  • 打赏
  • 举报
回复
楼主找本 java 中 swing 的书来看看就是了, 这些基础的东西不是人家可以教你的。
二月十六 版主 2017-11-07
  • 打赏
  • 举报
回复
翻译什么?翻译代码?还是翻译注释,照着百度翻译一点一点的看
Summary Enterprise Java Microservices is an example-rich tutorial that shows how to design and manage large-scale Java applications as a collection of microservices. Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications. About the Technology Large applications are easier to develop and maintain when you build them from small, simple components. Java developers now enjoy a wide range of tools that support microservices application development, including right-sized app servers, open source frameworks, and well-defined patterns. Best of all, you can build microservices applications using your existing Java skills. About the Book Enterprise Java Microservices teaches you to design and build JVM-based microservices applications. You'll start by learning how microservices designs compare to traditional Java EE applications. Always practical, author Ken Finnigan introduces big-picture concepts along with the tools and techniques you'll need to implement them. You'll discover ecosystem components like Netflix Hystrix for fault tolerance and master the Just enough Application Server (JeAS) approach. To ensure smooth operations, you'll also examine monitoring, security, testing, and deploying to the cloud. What's inside The microservices mental model Cloud-native development Strategies for fault tolerance and monitoring Securing your finished applications About the Reader This book is for Java developers familiar with Java EE. About the Author Ken Finnigan leads the Thorntail project at Red Hat, which seeks to make developing microservices for the cloud with Java and Java EE as easy as possible. Table of Contents Part 1. Microservices basics Chapter 1. Enterprise Java microservices Chapter 2. Developing a simple RESTful microservice Chapter 3. Just enough Application Server for microservices Chapter 4. Microservices testing Chapter 5. Cloud native development Part 2. Implementing Enterprise Java microservices Chapter 6. Consuming microservices Chapter 7. Discovering microservices for consumption Chapter 8. Strategies for fault tolerance and monitoring Chapter 9. Securing a microservice Chapter 10. Architecting a microservice hybrid Chapter 11. Data streaming with Apache Kafka Appendix. Spring Boot microservices

34,575

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧