Accessing string from other classes

Sorry if this seems simple to you, but i'm having problems accessing four string that are declared and used in my public class from another class.
I've tried declaring the strings public but it still says 'cannot resolve symbol' when i try to compile.
Help much appreciated.
fightspam

Yep, heres my code(sorry if it's a bit untidy):
//Zimmerman M3 email client.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.io.*;
class where extends JFrame implements ActionListener
     private JLabel path;
     private JTextField pathText;
     private String pathFile;
     private JButton save;
     File outputFile = new File(pathFile);
     public where()
          super("Save Email");     
          Container f=getContentPane();
               f.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 5));
          f.setBackground(Color.lightGray);
          path = new JLabel("Path: ");
          f.add(path);
          pathText = new JTextField(20);
          f.add(pathText);
          save = new JButton("Save");
          f.add(save);
          this.setSize(300, 100);
     public void actionPerformed(ActionEvent q)
          pathFile = pathText.getText();
          try
               FileWriter out = new FileWriter(outputFile);
               out.write(zimmernorm.toFile);
               out.write(zimmernorm.fromFile);
               out.write(zimmernorm.subjectFile);
               out.write(zimmernorm.bodyFile);
               out.close();
          catch(IOException err)
               System.exit(0);
class about extends JFrame
     private JLabel title;
     public about()
          super("About Zimmerman M3");
          Container d=getContentPane();
               d.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 5));
          d.setBackground(Color.lightGray);
          title = new JLabel("Zimmerman M3 by Louis Goddard, 2003");
          d.add(title);
          this.setSize(246, 62);
class newmail extends JFrame implements ActionListener
     public static String toFile, fromFile, subjectFile, bodyFile;
     public JTextField To, From, Subject;
     private String toBuffer, fromBuffer, subjectBuffer, bodyBuffer;
     private JButton send, clear;
     private JTextArea Body;
     private JLabel toLabel, fromLabel, subjectLabel;
     private JMenuBar mb;
     private JMenu File, Edit;
     private JMenuItem New, Sender, Copy, Paste, About;
     public newmail()
                super("New Email");
          Container c=getContentPane();
               c.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 5));
          c.setBackground(Color.lightGray);
          //<MENU STUFF!!!>     
               mb = new JMenuBar();
               File = new JMenu("File");
               Edit = new JMenu("Edit");
               New = new JMenuItem("New");
               Sender = new JMenuItem("Save");
               Copy = new JMenuItem("Copy");
               Paste = new JMenuItem("Paste");
               File.add(New);
               New.addActionListener(this);
               New.setActionCommand("1");
               File.add(Sender);
               Sender.addActionListener(this);
               Sender.setActionCommand("2");
               Edit.add(Copy);
               Copy.addActionListener(this);
               Copy.setActionCommand("3");
               Edit.add(Paste);
               Paste.addActionListener(this);
               Paste.setActionCommand("4");
               mb.add(File);
               mb.add(Edit);
               setJMenuBar(mb);
          //</MENU STUFF!!!>     
          toLabel = new JLabel("To:          ");
          c.add(toLabel);
          To = new JTextField(35);
          c.add(To);
          fromLabel = new JLabel("From:     ");
          c.add(fromLabel);
          From = new JTextField(35);
          c.add(From);
          subjectLabel = new JLabel("Subject:");
          c.add(subjectLabel);
          Subject = new JTextField(35);
          c.add(Subject);
          Body = new JTextArea(12,40);
          c.add(Body);
          send = new JButton("Send");
                c.add(send);
          clear = new JButton("Clear");
                c.add(clear);
          clear.addActionListener(this);
          clear.setActionCommand("6");
          this.setSize(459, 364);
          public static void main(String []args)
               JFrame.setDefaultLookAndFeelDecorated(true);
               new newmail().show();
          public void actionPerformed(ActionEvent e)
               String s = e.getActionCommand();
               if (s == ("1"))
               new newmail().show();
               else if (s == ("2"))
               new where().show();
               toFile = To.getText();
               fromFile = From.getText();
               subjectFile = Subject.getText();
               bodyFile = Body.getText();
               else if (s == ("3"))
               bodyBuffer = Body.getSelectedText();
               toBuffer = To.getSelectedText();
               fromBuffer = From.getSelectedText();
               subjectBuffer = Subject.getSelectedText();
               else if (s == ("4"))
               Body.setText(bodyBuffer);
               To.setText(toBuffer);
               From.setText(fromBuffer);
               Subject.setText(subjectBuffer);
               else if (s == ("5"))
               new about().show();
               else if (s == ("6"))
               To.setText("");
               From.setText("");
               Subject.setText("");
               Body.setText("");
public class zimmernorm extends JFrame implements ActionListener
     public String toFile, fromFile, subjectFile, bodyFile;
     private String toBuffer, fromBuffer, subjectBuffer, bodyBuffer;
     private JMenuBar mb;
     private JMenu File, Help, View;
     private JMenuItem New, About, Inboxmenu, Outboxmenu, Savedmenu;
     public zimmernorm()
                super("Zimmerman M3");
          Container c=getContentPane();
               c.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 5));
          c.setBackground(Color.lightGray);
          //<MENU STUFF!!!>     
               mb = new JMenuBar();
               File = new JMenu("File");
               View = new JMenu("View");
               Help = new JMenu("Help");
               New = new JMenuItem("New");
               About = new JMenuItem("About");
               Inboxmenu = new JMenuItem("Inbox");
               Outboxmenu = new JMenuItem("Outbox");
               Savedmenu = new JMenuItem("Saved");
               File.add(New);
               New.addActionListener(this);
               New.setActionCommand("1");
               Help.add(About);
               About.addActionListener(this);
               About.setActionCommand("5");
               View.add(Inboxmenu);
               Inboxmenu.addActionListener(this);
               Inboxmenu.setActionCommand("7");
               View.add(Outboxmenu);
               Outboxmenu.addActionListener(this);
               Outboxmenu.setActionCommand("8");
               View.add(Savedmenu);
               Savedmenu.addActionListener(this);
               Savedmenu.setActionCommand("9");
               mb.add(File);
               mb.add(Help);
               mb.add(View);
               setJMenuBar(mb);
          //</MENU STUFF!!!>     
          this.setSize(1024, 768);
                this.setDefaultCloseOperation( EXIT_ON_CLOSE );
          public static void main(String []args)
               JFrame.setDefaultLookAndFeelDecorated(true);
               new zimmernorm().show();
          public void actionPerformed(ActionEvent e)
               String s = e.getActionCommand();
               if (s == ("1"))
               new newmail().show();
               else if (s == ("5"))
               new about().show();

Similar Messages

  • How to access variables from other class

        public boolean inIn(Person p)
            if  (name == p.name && natInsceNo == p.natInsceNo && dateOfBirth == p.dateOfBirth)
                 return true;
            else
                 return false;
        }//returns true if Person with same name/natInsceNo/dateOfBirth as phello,
    here am trying to compare the existing object with another object.
    could you please tell me how to access the variables of other class because i meet this error?
    name cannot be resolved!
    thank you!

    public class Person
        protected String name; 
        protected char gender;      //protected attributes are visible in the subclass
        protected int dateOfBirth;
        protected String address;
        protected String natInsceNo;
        protected String phoneNo;
        protected static int counter;//class variable
    //Constractor Starts, (returns a new object, may set an object's initial state)
    public Person(String nme,String addr, char sex, int howOld, String ins,String phone)
        dateOfBirth = howOld;
        gender = sex;
        name = nme;
        address = addr;
        natInsceNo = ins;
        phoneNo = phone;
        counter++;
    public class Store
        //Declaration of variables
        private Person[] list;
        private int count;
        private int maxSize;
    //constructor starts
        public Store(int max)
             list = new Person[max];//size array with parameters
             maxSize = max;
             count = 0;
        }//end of store
    //constructor ends
    //accessor starts  
        public boolean inIn(Person p)
           return (name == p.name && address == p.address && natInsceNo == p.natInsceNo);
        }//returns true if Person with same name/natInsceNo/dateOfBirth as phope it helps now!

  • Loading XML using a custom class and accessing it from other classes?

    I began with a class for a movie clip rollover function
    FigureRollOver. It works marvellously. Three things happen:
    1) it loads XML from a file "mod1_fig1.xml" and uses another
    class, XMLMember, to retool the scoping of the XML so that I can
    get at it
    2) an onload call inside of XMLMember calls the myOnLoad
    function and transfers the XML into an array.
    3) so long as the array is finished building, rolling over a
    movie clip attaches a new movie clip with the rollover text in it.
    But I don't want all those functions in one because I need it
    to be more dynamic, starting with being able to load any old xml
    file instead of just "mod1_fig1.xml", plus it seems like
    overbuilding to have all of that in one class, so I've separated
    out the loading of the XML and building of the array into its own
    class, FigureXMLLoader. FigureRollOver is then left to just attach
    the rollover with text in it, extracted from the array built by the
    new class.
    Problem is, though the array builds inside FigureXMLLoader, I
    can't figure out how to make it available outside the class. I know
    that I'm constructing things in the wrong order, and that the array
    needs to be somehow built inside the class function to be
    available, but I can't figure out how to do that. A cruddy
    work-around is to put a function call at the end of the building of
    the array, which calls yet ANOTHER function on the main timeline of
    my .swf to put the array I've just built into a new variable. This
    works, but it's messy. It seems like I should be able to have one
    line of script in the .swf that generates an array on the main
    timeline (or just a public array) which I can then access from my
    FigureRollOver class:
    var myRollOvers:Array = new FigureXMLLoader("mod1_fig1.xml");
    Here is FigureXMLLoader (see comments in the code for more
    details) which obviously does not return an array as it is, because
    of all the working around I've had to do. Note the "testing"
    variable, which can be traced from the main timeline of the .swf,
    but I will get "not what I want" because of course the array hasn't
    been built yet, and never will be, inside of the declaration as it
    is. How do I get it in there so I can return an array?
    Thanks!

    Suggest you ask this question in the Actionscript forum as
    this forum is
    more tuned to database integration questions.
    You can create arrays outside a class and pass them into it
    by reference and
    visa versa build arrays inside a class and pass out via
    reference.
    The preferred approach is to place the array in a class and
    not expose it.
    Then add methods to use the array or should we say to use the
    class.
    Lon Hosford
    www.lonhosford.com
    Flash, Actionscript and Flash Media Server examples:
    http://flashexamples.hosfordusa.com
    May many happy bits flow your way!
    "maija_g" <[email protected]> wrote in
    message
    news:ed4i43$9v0$[email protected]..
    > Update: I've now put this on the main timeline of the
    .swf:
    >
    > myRollOversLoaded = false;
    > var myRollOvers:Array;
    > var roll_content = new FigureXMLLoader("mod1_fig1.xml");
    >
    > And inside the "myOnLoad" function in FigureXMLLoader,
    just after the
    > while
    > loop I've put this:
    >
    > _root.myRollOversLoaded = true;
    > _root.myRollOvers = figure_arr;
    >
    > The movie clip rollover won't act until
    myRollOversLoaded is true. It
    > works,
    > but it still seems klugey. Any suggestions for a more
    elegant solution
    > would be
    > appreciated.
    >

  • How to access variables from other classe through getter ?

    Hi !
    I have 10 classes
    Cau_1.java containing char Cau_1_Answer;
    Cau_2.java... Cau_2_Answer;
    Cau_10.java... Cau_10_Answer;
    and another class Resume_grammar.java with char[] AnswerList = new Char[10] used to hold cau_1_Answer, Cau_2_Answer...Cau_10_Answer.
    but I don't success to get them.
    In Cau_1.java, I do :
    private static char Cau_1_Answer;
    static char getCau_1_Answer() {
              return Cau_1_Answer;
         static void setCau_1_Answer(char cau_1_Answer) {
              Cau_1_Answer = cau_1_Answer;
    if (a.isChecked()) {Cau_1_grammar.setCau_1_Answer('a');}
    if (b.isChecked()) {Cau_1_grammar.setCau_1_Answer('b');}
    if (c.isChecked()) {Cau_1_grammar.setCau_1_Answer('c');}
    if (d.isChecked()) {Cau_1_grammar.setCau_1_Answer('d');}
    Cau_2, Cau_3...are the same way.
    in Resume_grammar.java :
         static char[] AnswerList = new char[10];     
    AnswerList[0] = Cau_1_grammar.getCau_1_Answer();
    AnswerList[9] = Cau_10_grammar.getCau_10_Answer();
    When I make AnswerList display, all is null (nothing displayed).
    Please help ! What I do wrong ?
    Thank you !

    Johnny.vn wrote:
    Cau_1 is Question_1 (Vietnamese).
    I am developing a academic test application with many question and finally display the result of the test.
    Thank you.Back to the original question: why do you need to define different classes for different questions? Do they really behave differently in a way that can't be captured by a single class?

  • Method not accessible from other classes

    Hi,
    I ve defined a class and would like to create an instance of it from another class. That works fine, I am also able to access class variables. However the class method "calcul" which is defined as following, is not accessible from other classes:
    class Server {
    static String name;
    public static void calcul (String inputS) {
    int length = inputS.length();
    for (int i = 0 ; i < length; i++) {
    System.out.println(newServer.name.charAt(i)); }
    If I create an instant of the class in the same class, the method is then available for the object.
    I am using JBuilder, so I can see, which methods and variables are available for an object. Thanks for your help

    calcul is a static method, that means you do not need an instance of server to run this method. This method is also public, but your class Server is not, your Server class is package protected. So only classes within the same package has Server can use its method. How to use the calcul method?// somewhere in the same package as the Server class
    Server.calcul( "toto" );

  • Calling a object of class from other class's function with in a package

    Hello Sir,
    I have a package.package have two classes.I want to use object of one class in function of another class of this same package.
    Like that:
    one.java
    package co;
    public class one
    private String aa="Vijay";  //something like
    }main.java:
    package co;
    import java.util.Stack;
    public class main extends Stack
    public void show(one obj)
    push(obj);
    public static void main(String args[])
    main oo=new main();
    }when I compile main class, Its not compile.
    Its give error.can not resolve symbol:
    symbol: class one
    location: class co.main
    public void show(one obj)
                              ^Please help How that compile "Calling a object of class from other class's function with in a package" beacuse I want to use this funda in an application

    kumar.vijaydahiya wrote:
    .It is set in environment variable.path=C:\bea\jdk141_02\bin;.,C:\oraclexe\app\oracle\product\10.2.0\server\bin;. command is:
    c:\Core\co\javac one.javaIts compiled already.
    c:\Core\co\javac main.javaBut it give error.
    Both java classes in co package.Okay, open a command prompt and execute these two commands:
    // to compile both classes:
    javac -cp c:\Core c:\Core\co\*.java
    // to run your main-class:
    java -cp c:\Core co.main

  • How  add buttons to Jframe from other class

    Hi, a have a little problem;)
    I want make a JFrame, but i want to add JButtons from other class. Now I have something like that:
    My JFrame class:
    package windoow;
    import javax.swing.*;
    import java.awt.*;
    public class MyWindow extends JFrame {
           Butt buttons ;
            public Window(String s) {
                     super(s);
                    this.setSize(600, 600);
                    this.setVisible(true);
                    Buttons();
                public void Buttons(){
                    setLayout(null);            
                   buttons = new Butt();
                   buttons.mywindow =this;
    } My class with buttons:
    package windoow;
    import javax.swing.JButton;
    public class Butt {
            MyWindow mywindow;
            JButton b1;
            Butt(){
                      b1 = new JButton("Button");
                      b1.setBounds(100,100,100,20);
                      mywindow.add(b1);  
    } and i have NullPointerException.
    When i try to make new MyWindow in Butt clas i have something like StackOverFlow.
    what should i do?

    Your null pointer exception is occuring because, in your Butt() constructor, you are calling mywindow.add(b1), but you don't set mywindow until after you call the constructor in the MyWindow::Buttons() method.
    And, if you try to create a new MyWindow() in your Butt() constructor, and, assuming that you are calling the MyWindow::Window(String s) method from the MyWindow() constructor (which is not clear from the code fragment you posted), then Butt() calls new MyWindow() which calls Window(String s) which calls Butt() which calls ... and so on, until the stack overflows.
    One possible solution ... pass your MyWindow reference into your Butt() constructor as this, as so:
    public void Buttons()
       // stuff deleted
      buttons = new Butt( this );
       // stuff deleted
    // AND
    Butt( MyWindow mw )
       // stuff deleted
      mywindow = mw;
      mywindow.add( b1 ); // b1 created in stuff deleted section  
    }Also, I would call setVisible(true) as the last thing I did during the construction of the frame. This realizes the frame, and from that point forward, most changes to the frame should be made on the event thread.
    ¦ {Þ                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Accesing from other classes to protected void

    Hy! I'm a newbie to java programming. So i am making a program in J2ME, and the problem is :
    I have an abstract class, wich i must extend. That class defines a procedure
    abstract protected void destroyApp(boolean unconditional), so in my extended class this void is protected. But i want to access to this procedure from other class, and do it somehow static.
    I have made a main program class (the extended class), and i want to send from other class a destroy message to it (to call destroyApp procedure).
    Kazhha.

    Your question has nothing to do with Native Methods.
    In the future, for novice questions, use the New To Java Technology forum.
    I have an abstract class, which i must extend. That
    class defines a procedure
    abstract protected void destroyApp(boolean
    unconditional), so in my extended class this void is
    protected.You can make the method public in your class.
    But i want to access to this procedure
    from other class, and do it somehow static.IIRC you cannot make a method static if it is not static in the class you extend.
    I have made a main program class (the extended class),
    and i want to send from other class a destroy message
    to it (to call destroyApp procedure).Huh?

  • Making object accesible from other class?

    hi all
    how can i have an object of class to be accesible from other class?
    thanks

    It's not clear what you mean by "object of class". Do you mean fields within an object. Do you mean using an object of one class within the code of another?
    For most named objectes in java, whether field, method or class, there are four levels of access.
    public means accessible from anywhere in the program
    private means accessible only from the same source file.
    protected means only from the class, or a class that extends it.
    or if you don't put any of these keywords it means accessible only from the same package, that is set of source files in a single directory.

  • Put movies in itunes on one computer why does it not show up when i access itunes from other computers or ipad2?

    put movies in itunes on one computer why does it not show up when i access itunes from other computers or ipad2?

    i just purchased a file that had videos in it. i put them in the itunes library on my pc where i first downloaded them. i was able to transfer them to my other pc, a laptop, through my home network. i am now trying to get them on my mac pro desktop and my ipad2. my mac pro can see the other computers on my home network but i cannot get it to connect to them. i know the operating systems are different but was hoping i could transfer pictures and files from pc to mac this way. haven't been able to get it to work yet. the videos i am trying to get my mac to see came in a folder with both mac and pc versions. i thought if i got the videos i purchased into itunes that i would then be able to get them to my mac pro and my ipad2. i am new to mac/apple and have always been pc-centric so trying to marry it all has been difficult. i speak pc pretty well but am just learning apple. am i trying to do things that are not possible? i sure could use a knowledgable friendly soul to walk me through my issues of having pc and mac on the same network. i have been able to get all computers and ipad to print on my network. thanks.

  • Accessing data from other SAP system

    Hi experts
    I need to access data from one SAP system from other.  My requirement is , perform applications (programs) in some SAP system, but using/accessing  data from other SAP system .
    For example, when we press F4 we get the match code (search help) for the field ;  that window is alredy created by SAP and it shows the data for that field . Of course the application (ike any other program/application) read the data from the SAP system is being executing ;  well i need execute that match code but show (taking) the data from other SAP system;  i not refer to other MANDT in same system but other SAP system.
    The communication between SAP1 system and SAP2 system is already created from BASIS.
    My doubt is how can i  execute that standard application (search help) but 'invoke' to standard application this take data from other system ?
    I guess i can create Z search help wich call a Z Function (RFC) to get the data required from the other system ;
    or maybe enhance the standar search help to call that Z RFC ;  but standard application search help is already created and this access the data in several ways or places of code , and this has severals sub-windows and search features ; and i just need execute exactly same search help but accesing data from the other SAP system ; so my doubt is, is there some way to indicate to SAP the applications always (wherever) these applications acces the data do it but from other SAP system, 
    like if we 'redirect' the Data Base to other SAP system. 
    SAP1 applications are being executing  -
    >   but all data (records) are taking from SAP2
    Maybe the first suggestion is simply why do not we execute applications in SAP2 instead SAP1 , that's because the version package in SAP2 system (where we have the data) does not support some (non SAP) applications we need to use.
    Excuse the long thread.  Does somebody can help, any idea ?
    Best Regards
    Frank

    Hi Frank,
    Below are my thoughts, these are only conceptual and haven't had an opportunity to try these possibilities, also not sure if this is the right thing.
    1) Create an entry in DBCON using TCode: DBCO for the Database of system SAP2. Now in the application of SAP1 use the "SET CONNECTION" construct as the very first statement, so that consecutive SQL statements will point at the DB of SAP2.
    2) I have read somewhere that the Work Processes are connected to the Default database and i am not sure if you can change this setting, but if you can and provided you have have multiple application servers in your SAP1 landscape, then pick one of the application servers and change the settings on the WP to point at the DB of SAP2, you have the end users login to this particualr app server.
    3) If there are multiple app servers in SAP1 landscape, then choose one of the app servers and change the default database setting to point at DB of SAP2.
    Regards,
    Chen

  • Delete scroller from other class

    Hi.
    I have FlashSite class where after clicking to button i see page with text and with scroll.
    If i click to 'close' button i want removeChild this page, text and scroll.
    But for scroll i use code from other class. (i insert this class like: import classes.Scroller.*;)
    So, how i can remove this scroller?
    code:
    public function lilyContent():void
                   // create a sample pane
                   addChild(lilyPageScroll);
                   lilyPageScroll.x = 360;
                   lilyPageScroll.y = 400;
                   // then attach a new scroller to the pane
                   var lilyScroller = new Scroller(lilyPageScroll, lilyPageScroll.width, 540, new scrollerFace(),"vertical");
    i use this line:
    var lilyScroller = new Scroller(lilyPageScroll, lilyPageScroll.width, 540, new scrollerFace(),"vertical");
    to add scroller.
    all code for FlashSite class:
    package
         import flash.display.*;
         import flash.text.*;
         import flash.events.*;
         import classes.Scroller.*;
         public class FlashSite extends MovieClip 
              var lilyDeskBack:LilyDescriptionBackground = new LilyDescriptionBackground();
              var lilyPageScroll = new LilyContent();
              //constructor
              public function FlashSite()
                   stop();
                   addEventListener(Event.ENTER_FRAME, flashSiteLoading);
              public function flashSiteLoading(event:Event)
                   var mcBytesLoaded:int=this.root.loaderInfo.bytesLoaded;
                   var mcBytesTotal:int=this.root.loaderInfo.bytesTotal;
                   var mcKLoaded:int=mcBytesLoaded/1024;
                   var mcKTotal:int=mcBytesTotal/1024;
                   flashSiteLoading_txt.text="Loading: "+mcKLoaded+"Kb of "+mcKTotal+"Kb";
                   if (mcBytesLoaded>=mcBytesTotal)
                        removeEventListener(Event.ENTER_FRAME, flashSiteLoading);
                        gotoAndPlay('welcomeSite');
                        lilyBtn.addEventListener(MouseEvent.CLICK, lilyDescription);
                        roseBtn.addEventListener(MouseEvent.CLICK, roseDescription);
                        jasmineBtn.addEventListener(MouseEvent.CLICK, jasmineDescription);
                        irisBtn.addEventListener(MouseEvent.CLICK, irisDescription);
              public function lilyDescription(event:MouseEvent):void
                   trace("Lily description goes here.");
                   roseBtn.visible = false;
                   jasmineBtn.visible = false;
                   irisBtn.visible = false;
                   addChild(lilyDeskBack);
                   lilyDeskBack.x = 350;
                   lilyDeskBack.y = 330;
                   lilyContent();
                   lilyDeskBack.LilyDesckClose_btn.addEventListener(MouseEvent.CLICK, closeLilyDescription);
              public function closeLilyDescription(event:MouseEvent):void
                   trace("close Lily description");
                   removeChild(lilyDeskBack);
                   removeChild(lilyPageScroll);
                   lilyScroller.visible = false;
                   roseBtn.visible = true;
                   jasmineBtn.visible = true;
                   irisBtn.visible = true;
              public function roseDescription(event:MouseEvent):void
                   trace("Rose description goes here.");
              public function jasmineDescription(event:MouseEvent):void
                   trace("Jasmine description goes here.");
              public function irisDescription(event:MouseEvent):void
                   trace("Iris description goes here.");
              public function lilyContent():void
                   // create a sample pane
                   addChild(lilyPageScroll);
                   lilyPageScroll.x = 360;
                   lilyPageScroll.y = 400;
                   // then attach a new scroller to the pane
                   var lilyScroller = new Scroller(lilyPageScroll, lilyPageScroll.width, 540, new scrollerFace(),"vertical");
    Thanks for help

    Make the lilyScroller object a class level object.
    Add to 'closeLilyDescription' method 'removeChild(lilyScroller);'
    package
         import flash.display.*;
         import flash.text.*;
         import flash.events.*;
         import classes.Scroller.*;
         public class FlashSite extends MovieClip 
              var lilyDeskBack:LilyDescriptionBackground = new LilyDescriptionBackground();
              var lilyPageScroll = new LilyContent();
              var lilyScroller;
              //constructor
              public function FlashSite()
                   stop();
                   addEventListener(Event.ENTER_FRAME, flashSiteLoading);
              public function flashSiteLoading(event:Event)
                   var mcBytesLoaded:int=this.root.loaderInfo.bytesLoaded;
                   var mcBytesTotal:int=this.root.loaderInfo.bytesTotal;
                   var mcKLoaded:int=mcBytesLoaded/1024;
                   var mcKTotal:int=mcBytesTotal/1024;
                   flashSiteLoading_txt.text="Loading: "+mcKLoaded+"Kb of "+mcKTotal+"Kb";
                   if (mcBytesLoaded>=mcBytesTotal)
                        removeEventListener(Event.ENTER_FRAME, flashSiteLoading);
                        gotoAndPlay('welcomeSite');
                        lilyBtn.addEventListener(MouseEvent.CLICK, lilyDescription);
                        roseBtn.addEventListener(MouseEvent.CLICK, roseDescription);
                        jasmineBtn.addEventListener(MouseEvent.CLICK, jasmineDescription);
                        irisBtn.addEventListener(MouseEvent.CLICK, irisDescription);
              public function lilyDescription(event:MouseEvent):void
                   trace("Lily description goes here.");
                   roseBtn.visible = false;
                   jasmineBtn.visible = false;
                   irisBtn.visible = false;
                   addChild(lilyDeskBack);
                   lilyDeskBack.x = 350;
                   lilyDeskBack.y = 330;
                   lilyContent();
                   lilyDeskBack.LilyDesckClose_btn.addEventListener(MouseEvent.CLICK, closeLilyDescription);
              public function closeLilyDescription(event:MouseEvent):void
                   trace("close Lily description");
                   removeChild(lilyDeskBack);
                   removeChild(lilyPageScroll);
                   removeChild(lilyScroller);
                   lilyScroller.visible = false;
                   roseBtn.visible = true;
                   jasmineBtn.visible = true;
                   irisBtn.visible = true;
              public function roseDescription(event:MouseEvent):void
                   trace("Rose description goes here.");
              public function jasmineDescription(event:MouseEvent):void
                   trace("Jasmine description goes here.");
              public function irisDescription(event:MouseEvent):void
                   trace("Iris description goes here.");
              public function lilyContent():void
                   // create a sample pane
                   addChild(lilyPageScroll);
                   lilyPageScroll.x = 360;
                   lilyPageScroll.y = 400;
                   // then attach a new scroller to the pane
                   lilyScroller = new Scroller(lilyPageScroll, lilyPageScroll.width, 540, new scrollerFace(),"vertical");

  • Set JComponent from other class

    Hi, I have problem from set any JComponent (JButton,JTable, etc.)
    in class from other class.
    I have class A. In class I have JButton and JTable. In this class I have function, in that are I create new instance class B. Class B have function, that are set properties any item in class A.
    class A
    function createAnotherClass(){
    B bclass = new B();
    bclass.setItemInClassA(this);
    function setItem(){
    jTable.setBackground(Color.RED);
    etc.
    class B
    function setItemInClassA(A a){
    a.setItem();
    This is only example, but I need your hepl. Thank you

    hahaha, yeah right,
    i think we do not understand your problem.

  • Is there a way to access object from other schema?

    1. Is there a way to access object from other schema
    Without using synonym/public synonym without prefixing schema owner?
    2. If you do not see any object in all_objects by same name owned by connected user or public, can there still be objects hidden from this view? for instance synonyms created by SYSTEM
    TIA for help

    Well, you missed something somewhere. If there is no
    ALTER SESSION SET CURRENT_SCHEMA=whoeverthen there must be either public synonym for the object as this shows:
    SQL> CREATE USER a identified by a;
    User created.
    SQL> GRANT CREATE SESSION to a;
    Grant succeeded.
    SQL> CREATE USER b identified by b;
    User created.
    SQL> GRANT CREATE SESSION, CREATE PROCEDURE, CREATE PUBLIC SYNONYM to b;
    Grant succeeded.
    SQL> connect b/b
    Connected.
    SQL> CREATE PACKAGE test AS
      2     PROCEDURE testit;
      3  END;
      4  /
    Package created.
    SQL> CREATE PACKAGE BODY test AS
      2  PROCEDURE testit IS
      3  BEGIN
      4     NULL;
      5  END;
      6  END;
      7  /
    Package body created.
    SQL> connect a/a
    Connected.
    SQL> desc b.test
    ERROR:
    ORA-04043: object b.test does not exist
    SQL> connect b/b
    Connected.
    SQL> GRANT EXECUTE ON test TO a;
    Grant succeeded.
    SQL> connect a/a
    Connected.
    SQL> desc b.test;
    PROCEDURE TESTIT
    SQL> desc test;
    ERROR:
    ORA-04043: object test does not exist
    SQL> connect b/b
    Connected.
    SQL> CREATE PUBLIC SYNONYM test FOR TEST;
    Synonym created.
    SQL> connect a/a
    Connected.
    SQL> desc test
    PROCEDURE TESTITAnother possibility without public synonyms is that crv had granted the other user privileges on some object, and the other user creates a private synonym for that. When crv granted privileges on a different object with the same name, the private synonym became valid again. Something like:
    SQL> connect /
    Connected.
    SQL> drop public synonym test;
    Synonym dropped.
    SQL> GRANT CREATE SYNONYM TO a;
    Grant succeeded.
    SQL> connect a/a
    Connected.
    SQL> desc test;
    ERROR:
    ORA-04043: object test does not exist
    SQL> desc b.test
    PROCEDURE TESTIT
    SQL> CREATE SYNONYM test FOR b.test;
    Synonym created.
    SQL> desc test;
    PROCEDURE TESTIT
    SQL> connect b/b
    Connected.
    SQL> REVOKE EXECUTE ON test FROM a;
    Revoke succeeded.
    SQL> connect a/a
    Connected.
    SQL> desc test;
    ERROR:
    ORA-04043: object "B"."TEST" does not exist
    SQL> desc b.test
    ERROR:
    ORA-04043: object b.test does not exist
    SQL> connect b/b
    Connected.
    SQL> DROP PACKAGE test;
    Package dropped.
    SQL> CREATE FUNCTION test (p_num IN NUMBER) RETURN NUMBER AS
      2  BEGIN
      3     RETURN p_num * 10;
      4  END;
      5  /
    Function created.
    SQL> GRANT EXECUTE ON test TO a;
    Grant succeeded.
    SQL> connect a/a
    Connected.
    SQL> desc test;
    FUNCTION test RETURNS NUMBER
    Argument Name                  Type                    In/Out Default?
    P_NUM                          NUMBER                  INSo, I would go looking for the synonyms.
    TTFN
    John

  • Flash Vars is not working when we accessing from other class files

    Hi all, I'm currently developing a flex application where i
    need to pass the data from the flash vars to the other class files
    instead of the main actionscript class file.
    Does any body know how i should go about doing that?? you can
    see this below code : please help me out if u know how to solve
    testnew2.as file
    package {
    import flash.display.Sprite;
    import flash.display.LoaderInfo;
    public dynamic class testnew2 extends Sprite {
    public var
    xmlfile:String=String(root.loaderInfo.parameters.lists);
    public function testnew ():void{
    package {
    import flash.text.TextField;
    import flash.display.Sprite;
    import flash.display.LoaderInfo;
    public dynamic class testnew extends testnew2 {
    public function testnew () {
    var myText:TextField = new TextField();
    // this assumes that you are going to pass in an id variable
    // on the end of the myFile.swf?id=12345 or
    // use FlashVars in the HTML parameter list for instance
    // 'FlashVars', 'id=123456', 'width', '1024',
    myText.text = new testnew2().xmlfile;
    addChild(myText);
    but if we access in same file it is working fine:
    package {
    import flash.text.TextField;
    import flash.display.Sprite;
    import flash.display.LoaderInfo;
    public dynamic class testnew extends Sprite {
    public function testnew () {
    var myText:TextField = new TextField();
    myText.text = String(root.loaderInfo.parameters.lists);
    addChild(myText);

    Pass the data into the main app, then from there either pass
    it into the sub-components or use
    Application.application.parameters, or bind to the values.
    Tracy

Maybe you are looking for

  • Since upgrading to Firefox 6 my computer has gone from staying up until yearly power failures to crashing many times a day.

    VERY strange. I upgraded to 6 when it came out and it took me quite a few days later to figure out WHY I went from no crashes to nvidia driver crashes MANY times a day. It was firefox 6.0. I thought my nvidia drivers were out of date. They were one v

  • JSTL xml not working

    Hi, I'm trying to parse an xml document using JSTL XML libraries. The following is a code snippet from my app: <x:parse var="ox" xml="${xml}"/>      <x:set var="pageItemCount" select='count($ox/osSummary/summaryGroup/summaryItem)'/>      <x:set var="

  • Can I make folders in Form Central?

    Can someone help me with this? I would like to be able to create folders in FormsCentral but if it can be done I don't have a clue on how to do it, Thanks in advance for your cooperation

  • Can't login to Mac OS X Server (10.3.x)

    We have a server that will not display the login screen. It loads all of the services (and they are working) ie: AFP, FTP and WWW but we can't login it never displays the screen. We have tried to repair perm. and checked the drive. We tried to re-ins

  • Flash'n Yellow

    Finally got my AE Base station up and running. Everything going along great on internet printed a couple of things and all of a sudden I see the "Flashing Yellow. Went to AE utility/summary and status tells me"Disk needs repair". What disk, and is th