专注于互联网--专注于架构

最新标签
网站地图
文章索引
Rss订阅

首页 »Java教程 » netbeans:NetBeans Options Window Module Tutorial »正文

netbeans:NetBeans Options Window Module Tutorial

来源: 发布时间:星期四, 2009年1月8日 浏览:78次 评论:0
  Note: This is not the latest version of this document. It applies to NetBeans IDE 6.0/6.1 _disibledevent= pref.get("namePreference", "");
pref.addPreferenceChangeListener( PreferenceChangeListener {
  public void preferenceChange(PreferenceChangeEvent evt) {
     (evt.getKey.equals("namePreference")) {
      jTextField1.Text(evt.getNewValue);
    }
  }
});
jTextField1.Text(name);

  Install the module again.   Whenever the application restarts, the current preference in the Options window is shown in the TopComponent. And whenever you change the preference in the Options window, the TopComponent immediately reflects the value, as soon as OK is clicked in the Options window.

  Congratulations! You have successfully completed the Options Window Module Tutorial. You now know how to provide the functionality needed for users to your module's options.

1

相关文章

读者评论

发表评论

  • 昵称:
  • 内容: