简体   繁体   English

如何使用Java AWT显示信息?

[英]How to display info using Java AWT?

I've developed an application using servlets, MySQL and Tomcat. 我已经使用Servlet,MySQL和Tomcat开发了一个应用程序。 I've been asked to create a version of this application that does not require the use of a server. 我被要求创建不需要使用服务器的该应用程序的版本。

I've researching and I think that what I need is to create windows where I can show information to the user and to retrieve information from the users. 我正在研究,我认为我需要创建一个窗口,在其中可以向用户显示信息并从用户那里检索信息。

I've learned how to build windows by using Java AWT, and how to add buttons, lists... What I don't know how to do is to show the information stored in MySQL to the user. 我已经学会了如何使用Java AWT构建窗口,以及如何添加按钮,列表...我不知道该怎么做,是向用户显示存储在MySQL中的信息。

If the user wants to visualice the content of one of the tables of the database I should show in the window a table showing the different rows and columns of the table. 如果用户想看清楚数据库中一个表的内容,我应该在窗口中显示一个表,该表显示该表的不同行和列。

How could I do it using AWT? 如何使用AWT做到这一点?

Thanks 谢谢

I'd like to suggest JFC/Swing . 我想建议JFC / Swing The Swing toolkit includes a rich set of components for building GUIs and adding interactivity to Java applications. Swing工具箱包含一组丰富的组件,用于构建GUI并向Java应用程序添加交互性。 Take a look at JTable component. 看一下JTable组件。 Using JTable you can display tables of data. 使用JTable可以显示数据表。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM