Can i print the contents of a textarea or textfield in java
printing through javahOW CAN Print the contents in a textfield or textarea in java
Page 1 of 1
3 Replies - 1267 Views - Last Post: 03 March 2010 - 08:27 PM
Replies To: printing through java
#2
Re: printing through java
Posted 03 March 2010 - 08:18 PM
#3
Re: printing through java
Posted 03 March 2010 - 08:20 PM
Geetanjalid, on 03 March 2010 - 06:16 PM, said:
Can i print the contents of a textarea or textfield in java
Sure you can. Use the .getText() method.
JTextField text1 = new JTextField("Words, words, words", 20);
System.out.println(text1.getText());
Works the same for the JTextArea.
This post has been edited by zim1985: 03 March 2010 - 08:20 PM
#4
Re: printing through java
Posted 03 March 2010 - 08:27 PM
If you want to keep the original format
http://www.dreaminco...=1&#entry375982
writtent in june 2008 will print any JComponent as it appears on screen
http://www.dreaminco...=1&#entry375982
writtent in june 2008 will print any JComponent as it appears on screen
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote





|