Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-19-2008, 09:03 AM
Member
 
Join Date: May 2008
Posts: 9
Judoon_Platoon is on a distinguished road
[SOLVED] Creating List of Values Using ClipBoard Object
Hey, little problem I am trying to solve.

I have a bunch of checkboxes and some ComboBoxes which the user selects in my application, all the necessary information i need gets passed into a variable, then when the user presses a button, that info gets put into a TextArea. Basically all I need is for every time the user pushes the button, the information from the variable gets put into the TextArea again, and since the info in the variable changes when the user selects different options, it will create a list of different selections.

I am using a system clipboard object, but I can't seem to make it add the value to the TextArea, not just replace the old value.

(BTW I am very begginer Java programer)

Last edited by Judoon_Platoon : 05-19-2008 at 09:09 AM.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 05-20-2008, 11:43 PM
Senior Member
 
Join Date: Jul 2007
Posts: 1,022
hardwired is on a distinguished road
The Clipboard is used for data transfer; mostly cut, copy and paste operations. There's no need to use it for what you are describing.
Code:
JTextArea textArea; // ActionListener for your JButton public void actionPerformed(ActionEvent e) { // get the selection state of all of your checkBoxes and comboBoxes // make up a string with the desired info textArea.setText(yourString); // or if you want to preserve previous entries textArea.append(yourString); }
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 05-21-2008, 09:07 AM
Member
 
Join Date: May 2008
Posts: 9
Judoon_Platoon is on a distinguished road
Thanks for your help their, i had not heard of the 'append' function before.
Thanks heaps.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a Comparable object Java Tip java.lang 0 04-15-2008 08:38 PM
List views, a type of object Leprechaun New To Java 2 02-06-2008 04:07 AM
Getting values of an Option List mutuah Advanced Java 0 08-07-2007 04:42 AM
how to remove an object from the array list cecily New To Java 3 08-02-2007 03:26 PM
Creating object of Type Object class venkatv New To Java 3 07-17-2007 04:33 PM


All times are GMT +3. The time now is 01:12 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org