How can i be able to get the same LIST?

im a newbei in java, and still studying about it. i hope i can ask some help from you all.^^
i really have a problem about my project, this program adds,searches and deletes the items inputted by the user. my problem is that, i cant make a connection between the objects added by the user to the searching class. i have different classes for adding, searching and deleting. the objects are first created in the adding class and the object must be present during the time when i start the searching class or even the delete class. i am using the LinkedList datastructure to search add and delete. and also i am using GUI for this project.
what should i do to build the connection between the objects and the other classes?
please help me. thank you for the time to reply to this post^^ i really appreciate it!

thank you CeciNEstPasUnProgrammeur , here i changed it and ther is no error:
     public Object post(Object o){
          for(Node node=first.getNext();node!=last;node=node.getNext()){
               if(o.equals(node.getData())){
                    Object aw = node.getData();
                    return aw;
          return null;
     }is the code valid?
here is the code for my Aadd class (the class for the adding of the inputs in the List), its not the final because i think there's something wrong with my codes, but i don't know what. Eventhough i already got the point on the connection between the object from another class to the class that would search, the output isn't diplayed.
I have a class Aresult(the class that displays the inputs of the user). even with the searching class no output from the adding of the inputs was produced. i wonder if it is the initialization of the objects, is it valid?
Sorry if the code is too long, i hope you woudn't mind.
here is a part of the code from the search class:
    public Sresult(String date) {
          setResizable(false);
        SresultLayout customLayout = new SresultLayout();
          dates = date;
          Aadd.aaddS.contains(dates);//<<<------- here is for the display
          if(Aadd.aaddS.contains(dates)==true){
               Aadd.aaddS.post(dates);
               String datess = Aadd.aaddS.post(dates).toString();
               setDate(datess);//<<<-- up to here
        getContentPane().setFont(new Font("Helvetica", Font.PLAIN, 12));
        getContentPane().setLayout(customLayout);
        ifevent = new JLabel("here are the found event/s in the date.");
        ifevent.setFont(new Font("Copperplate Gothic Bold", Font.BOLD,16));
        getContentPane().add(ifevent);
        resultevent = new JTextArea();
        sp_resultevent = new JScrollPane(resultevent);
        getContentPane().add(sp_resultevent);
        resultevent.setText(getDate());//<<<<---- for the string to appear in the JTextArea, but it doesn'tThere is no error from these codes but there is something wrong. can you please check it? thank you! i would really appreciate your help^^.
here is the code, but i cut the last part with the Layout class:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.io.*;
public class Aadd extends JFrame {
    JLabel instructdate;
    JTextField inputdate;
    JScrollPane sp_inputdate;
    JLabel instructe;
    JTextField inpute;
    JScrollPane sp_inpute;
    JLabel instructn;
    JTextField inputn;
    JScrollPane sp_inputn;
    JButton cancelb;
    JButton exitb;
    JButton doneb;
    JLabel instructetitle;
    JTextField inputetitle;
    JLabel bgad;
    String dates;
    String events;
    String notes;
    String titles;
    static List aaddS = new LinkedList();<<<--- the use of static for searching
    List aaddBig = new LinkedList();
    public Aadd() {
          setResizable(false);
        AaddLayout customLayout = new AaddLayout();
        getContentPane().setFont(new Font("Helvetica", Font.PLAIN, 12));
        getContentPane().setLayout(customLayout);
        instructdate = new JLabel("input the date at the space below.");
        instructdate.setFont(new Font("Copperplate Gothic Bold", Font.BOLD,16));
        getContentPane().add(instructdate);
        inputdate = new JTextField("");
        sp_inputdate = new JScrollPane(inputdate);
        inputdate.addActionListener(new TextHandler());
        getContentPane().add(sp_inputdate);
        instructe = new JLabel("input the event at the space below.");
        instructe.setFont(new Font("Copperplate Gothic Bold", Font.BOLD,16));
        getContentPane().add(instructe);
        inpute = new JTextField("");
        sp_inpute = new JScrollPane(inpute);
        inpute.addActionListener(new TextHandler());
        getContentPane().add(sp_inpute);
        instructn = new JLabel("input the note at the space below.");
        instructn.setFont(new Font("Copperplate Gothic Bold", Font.BOLD,16));
        getContentPane().add(instructn);
        inputn = new JTextField("");
        sp_inputn = new JScrollPane(inputn);
        inputn.addActionListener(new TextHandler());
        getContentPane().add(sp_inputn);
        Icon cbpic = new ImageIcon("bgs/button-cancel.jpg");
        cancelb = new JButton(cbpic);
        cancelb.setActionCommand("cancel");
        cancelb.addActionListener(new ButtonHandler());
        getContentPane().add(cancelb);
        Icon ebpic = new ImageIcon("bgs/button-exit.jpg");
        exitb = new JButton(ebpic);
        exitb.setActionCommand("exit");
        exitb.addActionListener(new ButtonHandler());
        getContentPane().add(exitb);
        Icon dbpic = new ImageIcon("bgs/button-done.jpg");
        doneb = new JButton(dbpic);
        doneb.setActionCommand("done");
        doneb.addActionListener(new ButtonHandler());
        getContentPane().add(doneb);
        instructetitle = new JLabel("input the title of the event.");
        instructetitle.setFont(new Font("Copperplate Gothic Bold", Font.BOLD,16));
        getContentPane().add(instructetitle);
        inputetitle = new JTextField("");
        inputetitle.addActionListener(new TextHandler());
        getContentPane().add(inputetitle);
          int q=1+(int)(Math.random()*2);
          switch(q){
               case 1: Icon bgpic = new ImageIcon("bgs/bgf.jpg");
                           bgad = new JLabel(bgpic);
                       getContentPane().add(bgad);
                       break;
               case 2: Icon bgpic2 = new ImageIcon("bgs/bgf2.jpg");
                           bgad = new JLabel(bgpic2);
                       getContentPane().add(bgad);
                       break;
        setSize(getPreferredSize());
/*       addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {
                System.exit(0);
        pack();
        show();
  /*  public static void main(String args[]) {
        Aadd window = new Aadd();
        window.setTitle("Aadd");
        window.pack();
        window.show();
    class TextHandler implements ActionListener{   //<<<------- here to
          public void actionPerformed(ActionEvent e){
               if(e.getSource()==inputdate){
                    String date = "";
                    date = e.getActionCommand();
                    setDate(date);
                    aaddS.add(date);
               if(e.getSource()==inpute){
                    String event = "";
                    event = e.getActionCommand();
                    setEvent(event);
                    aaddS.add(event);
               if(e.getSource()==inputn){
                    String note = "";
                    note = e.getActionCommand();
                    setNote(note);
                    aaddS.add(note);
               if(e.getSource()==inputetitle){
                    String title = "";
                    title = e.getActionCommand();
                    setTitle(title);
                    aaddS.add(inputetitle); //<<<<<<--------- here is the forming of the objects.
    class ButtonHandler implements ActionListener{
          public void actionPerformed(ActionEvent e){
               if(e.getActionCommand().equals("done")){
                    hide();
                    Aresult ar = new Aresult(getDate(),getEvent(),getNote(),getTitle());
                    aaddBig.add(aaddS);
               //     out.writeObject(aaddBig);
               //     out.writeObject(aaddBig);
                    //put the IO here to save
               else if(e.getActionCommand().equals("cancel")){
                    hide();
                    Main ma = new Main();
               else if(e.getActionCommand().equals("exit")){
                    Option op = new Option();
     public void setDate(String d){
          dates = d;
     public void setEvent(String e){
          events = e;
     public void setNote(String n){
          notes = n;
     public void setTitle(String et){
          titles = et;
     public String getDate(){
          return dates;
     public String getEvent(){
          return events;
     public String getNote(){
          return notes;
     public String getTitle(){
          return titles;
}THANK YOU!^^

Similar Messages

  • How can i stop user to get the same screen while entering same T code

    hi experts,
    how can i stop user to get the same screen while entering same T code (_Means i want user enter same t code but got different different screen how it is possible.)_
    i want to know how can we set a authorization is such a manner ...
    Through different different login id user got different different screen while entering same T-code.
    for example if there is two functional login id mum & noida...
    then user login through that and
    enter any same functional tcode (for getting purchase order)
    but get different different window...so how come it is possible.....
    plz explain in brief
    thanks in advance...plz do reply as soon as possible

    For a custom transaction this is easy, you need to ask your developers to be able to direct users to different screens based on the results of an authorisation check.  You could have an auth field e.g. ZSCREEN which is checked in the program & decides what screen the user has access to.
    For standard transactions, unless already coded, I would forget it & do what is recommended by Subramaniam and create transaction variants as required.  Assign each variant to a custom t-code and users access it that way.
    What I am interested is is why do you want to do this?

  • HT5699 I forgot the answers for security questions, how can I reset them and get the access back to the iTunes store?

    Need help to get access to iTunes store. I bought an iTunes card bor buying on iTunes store.
    I forgot the answers for security questions, how can I reset them and get the access back to the iTunes store?

    If you have a rescue email address (which is not the same thing as an alternate email address) set up on your account then go to https://appleid.apple.com/ and click 'Manage your Apple ID' on the right-hand side of that page and log into your account. Then click on 'Password and Security' on the left-hand side of that page and on the right-hand side you should see an option to send security question reset info to your rescue email address.
    If you don't have a rescue email address (you won't be able to add one until you can answer 2 of your questions) then you won't get the reset option - you will need to contact iTunes Support or Apple to get them reset.
    e.g. you can try contacting iTunes Support : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Account Management , and then 'Forgotten Apple ID security questions'
    or try ringing Apple in your country and ask to talk to the Accounts Security Team : http://support.apple.com/kb/HE57
    When they've been reset (and if you don't already have a rescue email address) you can then use the steps half-way down this page to add a rescue email address for potential future use : http://support.apple.com/kb/HT5312 . Or you could change to 2-step verification : http://support.apple.com/kb/HT5570

  • HT201272 Hello there,I delete my scruff application on the 8/05/13. Receipt N: 184052577343. And I was charged ammount of £ 16.99on the 15/05/13. I t's a Subscription Renewal. How can I stop it and get the refund of this ammount back on my account? Thank

    Hello there,I delete my scruff application on the 8/05/13. Receipt N: 184052577343. And I was charged ammount of £ 16.99on the 15/05/13. I t's a Subscription Renewal. How can I stop it and get the refund of this ammount back on my account? Thank you!!

    There are instructions on this page for managing and stopping auto-renewing subscriptions (deleting an app won't stop it) : http://support.apple.com/kb/HT4098
    In terms of a refund, what does it say on the app's description page in the store (a lot say that refunds aren't given) ? But you can try contacting iTunes Support and see if they will refund or credit you : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • How can I use applet to get the desktop image of client

    hi,I have a question to ask u.
    How can I use applet to get the desktop image of client? Now I develop a web application and want user in the client to get his current image of the screen.And then save as a picture of jpeg format ,then upload it to the server?
    I have done an application to get the screen image and do upload file to server in a servlet with the http protocal.

    Since the desktop image is on the client's local hard drive, you'll need to look at trusted applets first.

  • TS4020 I live in a house with multiple iCloud users.  When they try to turn on "Find my computer"  they get the message that they will have to disable my "find my computer" setting in order to enable theirs.  How can they all be enabled at the same time?

    I live in a house with multiple iCloud users.  When they try to turn on "Find my computer"  they get the message that they will have to disable my "find my computer" setting in order to enable theirs.  How can they all be enabled at the same time?

    Try this support document for information on how to contact Apple and account security. Apple ID: Contacting Apple for help with Apple ID account security

  • HT1349 I am trying to download the new version of itunes and it is stating that it has an invalid signature and the downloan has been removed.  How can I download it or get the signature?

    I am trying to download the new version of itunes and it is stating that it has an invalid signature and the downloan has been removed.  How can I download it or get the signature?

    Try the following user tip:
    Troubleshooting issues with iTunes for Windows updates

  • I bought the HD season version of breaking bad, however I only need the regular @ 19.95. How can I change this and get the difference refunded?

    bought the HD season version of breaking bad, however I only need the regular @ 19.95. How can I change this and get the difference refunded?

    When you purchase an HD video on a supported device or computer, only HD video will be downloaded. To download the SD version, you need to download the video again from your Purchased page. Conversely, if you purchase an HD video on an unsupported device, the SD version will be downloaded. Then, you will need to download the HD version from your Purchased page. Learn more about downloading previous purchases."
    iTunes: Purchasing and viewing HD videos

  • How can 2 people use itunes in the same household? we both have iphone 4 and separate id but the same itunes? pleasehelp

           how can two people use itunes in the same household? i had a iphone before so alreday had an itunes account now me and my husband have upgraded and we now both have them. he has set up a username and i have mine yet when he logs in he seems to just get my account? please help

    Decide which iPhone will be keeping the current iCloud account.  On the one that will be changing accounts, if you have any photos in photo stream that are not in your camera roll or backed up somewhere else save these to your camera roll by opening the photo stream album in the thumbnail view, tapping Edit, then tap all the photos you want to save, tap Share and tap Save to Camera Roll.  If you are syncing Notes with iCloud, you'll also have to email your notes to yourself so they can be recreated in the new account as they cannot be migrated.
    Once this is done, go to Settings>iCloud, scroll to the bottom and tap Delete Account.  (This will only delete the account from this phone, not from iCloud.  The phone that will be keeping the account will not be effected by this.)  When prompted about what to do with the iCloud data, be sure to select Keep On My iPhone.  Next, set up a new iCloud account using a different Apple ID (if you don't have one, tap Get a Free Apple ID at the bottom).  Then turn iCloud data syncing for contacts, etc. back to On, and when prompted about merging with iCloud, choose Merge.  This will upload the data to the new account.
    Finally, to un-merge the data you will then have to go to icloud.com on your computer and sign into each iCloud account separately and manually delete the data you don't want (such as deleting your wife's data from your account, and vice versa).

  • How can I make different catalogs from the same image

    How can I make different catalogs from the same image where that image has been changed in some way between the catalogs. For instance if I wanted to have a catalogs for cropped images and have 3 catalogs one for 4x6 , 5x7 and 8x10 cropping. When I tried this , if I changed a file in one catalog that same image in the other would change also.

    Do not confuse the creation of the crops and the display in collections per crop ratio.
    Of course one virtual copy (VC) per crop ratio is needed. If the same image should be cropped in all 3 mentioned ratios there would be 3 VCs.
    The OP asked how to have/see a set of same-crop-ratios.
    After having created the virtual copies for whatever crop ratio he wants, the way to display this result in the fashion asked for is via smart collections, provided they can be found. Without a plugin the naming of the VC with the crop ratio applied is a straight way to achieve that.
    IF the wish is to get new crops automatically added. (See my answers 2+3)
    IF the wish is to creat static collections per crop ratio for a certain set of images, I'd go as follows:
    1. Select all images you want to have cropped in that way,.
    2. With this selection click on the + to add another collection and fill the dialog box like this:
    Then navigate into this newly created selection and perform the 4x6 crop - according to taste individually or by synchronizing the first crop.
    Cornelia

  • Label Printing Using Address Book - How can I Print multiple labels of the same name?

    Label Printing Using Address Book - How can I Print multiple labels of the same name?

    I used to be able to print multiple copies of the same picture on one page using iphoto. There was a customise button when you went through to print and it was there somewhere. I can't see it anymore - maybe since an upgrade.
    It's gone. But as a work-around, duplicate your photo (⌘D) to create as many versions as you want copies and select all at once. Then use the "Custom" print layout and set the photo size you want.
    After printing, trash the added versions.

  • How can I save multiple titles under the same DVD?

    I use HandBrake to rip DVD's into iTunes. How can I save multiple titles under the same DVD? For instance, I have a Jimi Hendrix documentary that comes with special features, such as concert performances. I would like to have the main feature and the special features saved in my iTunes under the same title, perhaps as different 'tracks' (kind of like how different songs can be saved under the same album).
    Is there a way for me to do this, or am I chasing phantoms?

    *This response is for iPhoto 11 (v9). If you're using an earlier version, please post back and let us know. Troubleshooting steps are not the same for different versions. To find out which iPhoto you have: iPhoto Menu -> About iPhoto)*
    Duplicate the photo first. (Photos -> Duplicate). This means that you will have multiple copies of the master as well as the edited version.
    If you use versions like this often and wish to have only one master then you can do this with Aperture.
    Regards
    TD

  • When importing songs of a same album but different artist iTunes will separate the artists. How can I bring all together in the same album?

    When importing songs of a same album but different artist iTunes will separate the artists. How can I bring all together in the same album?

    Generally setting a common Album Artist will fix things. For deeper problems see Grouping tracks into albums.
    tt2

  • I have three different listings for Bob Seger on my iPod (bob Seger, Bob Seger System and Bob Seger and The Silver Bullet Band) How can I put all 3 in the same artist folder without changing artist name?

    I have three different listings for Bob Seger on my iPod (Bob Seger, Bob Seger System and Bob Seger and The Silver Bullet Band) How can I put all 3 in the same artist folder without changing artist name?

    Can you just create a new "Playlist", name it Bob Seger and drag what you want into the Playlist.
    File/New Playlist

  • In Elements 7.0, how can I delete multiple photos at the same time?

    In Adobe Photoshop Elements 7.0, how can I delete multiple photos at the same time?   Please be a little specific so I can follow your instructions as I'm not real smart at computers; I'm an intermediate user.  Thank you.

    Shift-click the photos or Ctrl-click them to select them, then right-click one of them and choose Delete from Catalog. They will all go together.

Maybe you are looking for

  • Problemo

    I'm having a weird problem and am wondering if someone can help me fix it. I'm trying to make a game with a player spaceship that is controlled by keyboard input. But it won't move with the keyboard input until I click the mouse button. the problem m

  • Is there any alternative to set serveroutput on

    without having to use the set serveroutput on can i make the results display using dbms_output.put_line.i have tried using dbms_output.enable on somebody's advise. begin dbms_output.enable; dbms_output.put_line('xyz'); end; but the above one is not d

  • Re: WebEnterprise error pages

    Fred, WebEnterprise WE 1.0.D contains fairly extensive knobs for customizing your own exception pages. * Exceptions are now formatted via HTML templates (in the %{FORTE_ROOT}html/errors directory), so you can customize those files according to your n

  • QA job for sap bw project

    Hello Gurus,         will you please tell how to do QA job for sap bw project? Many thanks, Frank Zhang

  • Price List erro - variation between the number of price lists

    The following error is occuring when adding a price list.  Price List error - variation between the number of price lists and number of price lists items. We have reviewed with recommendations from the below post, but are UNABLE to run the 2nd propos