+ protected void showNews_actionPerformed(ActionEvent e)
+ {
+ showNews(showNews.isSelected());
+ }
+ void showNews(boolean visible)
+ {
+ {
+ jvnews.setVisible(visible);
+ showNews.setSelected(visible);
+ if (visible)
+ {
+ jvnews.refreshNews();
+ jvnews.toFront();
+ // try real hard to get focus when the news is first opened
+ new Thread(new Runnable() {
+ @Override
+ public void run()
+ {
+ while (jvnews.isVisible() && !jvnews.requestFocusInWindow())
+ {
+ try { Thread.sleep(50); } catch (InterruptedException x) {};
+ }
+
+ }
+ }).start();
+ }
+ }
+ }
+