【问题标题】:Setting the jFrame title from Excel cells info从 Excel 单元格信息中设置 jFrame 标题
【发布时间】:2015-11-30 17:25:16
【问题描述】:

我对 Java 完全陌生,我正在做我的任务,需要创建一个 jframe 并使用 excel 单元格命名标题。此外,我也不知道如何将 Excel 数据导入到我的 java 中。感谢您的帮助。 :)

public NewJFrame_1() {
    initComponents();
    Search.setVisible(true);
    this.setTitle(getTitleFromDB());
// which i want to return with the excel cells' info
private String getTitleFromDB() {
    return "ABC Company";

【问题讨论】:

  • I do not know how to import the Excel data into my java as well. - 你可以问你的老师,因为这是作业的一部分。或者您可以在网上搜索关键字,例如:“将 excel 导入 java”。网络是一个很好的信息来源,好好利用它吧。

标签: java jframe titlebar


【解决方案1】:

您应该使用Apache POI - the Java API for Microsoft Documents 来读取excel 文件。

检查此tutorial

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-01-10
    相关资源
    最近更新 更多