Results 1 to 1 of 1
Thread: JScrollPane with HTML
-
JScrollPane with HTML
The class below shows how to get HTML in JScrollPane.
Java Code:public class TestShowPage { public static void main(String args[]) { JTextPane tp = new JTextPane(); JScrollPane js = new JScrollPane(); js.getViewport().add(tp); JFrame jf = new JFrame(); jf.getContentPane().add(js); jf.pack(); jf.setSize(400,500); jf.setVisible(true); try { URL url = new URL("http://www.java-forums.org/faq.php"); tp.setPage(url); } catch (Exception e) { e.printStackTrace(); } } }
Similar Threads
-
jscrollpane problem
By monkey04 in forum AWT / SwingReplies: 2Last Post: 01-19-2008, 05:23 AM -
help with JScrollPane
By tommy in forum AWT / SwingReplies: 1Last Post: 08-06-2007, 07:58 PM -
how to draw an image inside of jscrollpane
By paty in forum Java AppletsReplies: 1Last Post: 07-24-2007, 12:44 AM -
JScrollPane not scrolling
By Riftwalker in forum Advanced JavaReplies: 2Last Post: 07-17-2007, 08:16 PM -
HTML to PDF
By Heather in forum New To JavaReplies: 1Last Post: 07-08-2007, 01:24 AM
Bookmarks