This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
hi, guys: I am doing the document development. Based on the posts on the forum, i try to use a "Contents and index" menu item under the Help menu. In my understanding, actionEvent->actionListener pattern should be implemented. When the user click the "Contents and index" item, a help document should be pop up. I made some code to do it, but when i clicked the "contents and index" item, no frame show up. Following is my code: public void actionPerformed(ActionEvent e){ URL helpURL=new URL ("file:///f:/suncertification/xiaoma.html"); JEditorPane editorPane = new JEditorPane(); editorPane.setContentType("text/html"); editorPane.setPage( helpURL ); editorPane.setEditable(true); JScrollPane helpScrollPane = new JScrollPane(editorPane); JFrame frame = new JFrame(); Container contentPane = frame.getContentPane(); contentPane.removeAll(); contentPane.add( helpScrollPane ); frame.show(); } Can u give me some idea how to make this code work? or something wrong in my design? Thanks! Xiaoma Wang
Sai Prasad
Ranch Hand
Joined: Feb 25, 2002
Posts: 560
posted
0
Try setting the size or using a JDialog instead of a frame.
xiaoma wang
Ranch Hand
Joined: Mar 04, 2002
Posts: 74
posted
0
Thank u, Sai. i made a big stupid mistake. Now i got it. Xiaoma Wang
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.