Why cann't setText to a JTextField??

Need your help!
I produce an array of JTextField and add it to a JPanel.
But I can only set text when initialized.
In other place,even I call setText function, it doesn't work.
Who know the reason??
thanks in advance!!
hgs.

the code is like this:
public class JFrame {
JPanel contentPane;
JPanel panel1 = new JPanel();
JTextField jt = new JTextField(20);
JPanel panel2 = new JPanel();
MyClass class = new MyClass();
public JFrame(){
panel1.add(jt);
panel2.add(class);
contentPane = (JPanel)this.getContentPane();
contentPane.add(panel1);
contentPane.add(panel2);
class MyClass{
public MyClass(){
// here if I call setText,It will work
// jt.setText("test");
public otherFunction(){
// here ,it dosen't work
jt.setText("test"); // it throw no exception when running

Similar Messages

  • Why cann't I open this URL of NAC flash demo?

    Hello,Guys
    why cann't I open this URL of NAC flash demo,Error appears under the web when I open
    Url:http://www.cisco.com/cdc_content_elements/flash/nac/demo.htm.
    It is error all the same after I installed flash player.How do I open this Url.
    Thank you!
    Respests!
    Min Quant

    Usually there is no need to install a flash player to view a flash presentation in a website as browsers altready have support for them. However if the flash needs some advanced features then the website will prompt for downloading the required version.
    In your case you may try to uninstall the software and then try to open the URL to view the demo. If it doesnot works you may download the latest version and get certain other information from this link
    http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_15511
    If nothing works then you can try using a diffrent browser (eg Firefox or Opera if you are using IE).

  • Why cann't i see the cube that i create with owb    ??

    hello:
    owb version:10.1.0.4
    db version:10.2.1.0.1
    Business Intelligence 10.1.2.0.2
    windows 2003
    i use owb create 3 dimensions and 1 cube,and deploy on target schema successfully.
    and export the metadata to eex file, and import eex file into discoverer administrator ,when create workbook i can see the cube created with owb;
    then i selected ORACLE BI DISCOVERER option to connect target_schema,so i can see my cube and dimension;
    but when i selected ORACLE BI DISCOVERER FOR OLAP option to connect target_schema, login in successful , but when i create my workbook ,cann't see my cube and demension
    why for this,and how to do it,so i can see them?
    pls help me!

    There are three ways to deploy a multi-dimensional model and the final model selection depends on the database options you have purchased and they tools you have at your displosal:
    relational access - You can define relational cubes and dimensions within OWB and deploy these to your target schema. The dimensions are implemented as query re-write objects and can be viewed within the view USER_DIMENSIONS. The data relating to the dimension is stored within a simple relational table, either as a snowflake or star schema format. The cube object does not really exist as such but is implemented as fact table. Typically, access to this type of implementation is via Discoverer and you need to create a Discoverer EUL to view the deployed tables. Within Discoverer you will not see the dimension or cubes listed but you will see tables and/or views relating to your deployed schema.
    The Discoverer Bridge will create the eex/EUL file to install the schema within Discoverer Administrator. However, you must use Discoverer Plus/Viewer with the relational connection details.
    As an FYI the management of Discoverer EULs is integrated within OWB 10gR2.
    OLAP models - OWB also supports the deployment a schema as either a relational OLAP model or within an analytic workspace (this creates a MOLAP model). The OLAP deployment can be viewed only using Discoverer OLAP, however, management of the schema does not require an EUL and the administration is managed by Discoverer Administrator. All the administration is managed by OWB. To access a multi-dimensional model using Discoverer OLAP you must first run the OLAP bridge from within OWB. This will deploy all the required metadata for Discoverer OLAP to connect to your schema.
    However, I would recommend you urgently upgrade to OWB10gR2 as this provides additional tuning options for the OLAP data model that are not present in your current version of OWB 10.1.0.4. Unfortunately, with your current OWB version building an OLAP model is a two stage process, a form of data staging. You need to create a relational target schema first and then replicate that target schema within an OLAP model. OWB10gR2 allows you to map data from a source object directly to a multi-dimensional object with no need to stage the data.
    If you cannot upgrade at this point my suggestion would be to use OWB to design the target relational schema and then use Analytic Workspace Manager (AWM) to design your OLAP schema for Discoverer OLAP access. AWM will provide you with all the tools for tuning and managing your OLAP model within a 10gR2 database schema.
    Once you have upgraded to OWB10gR2 you can stop using AWM as all the tuning features are within OWB.
    Hope this makes sense and is helpful.
    Keith

  • .settext not refreshing JTextField

    Hi,
    I am new to Java and developed a simple form that contains a button and textfield. When I click on the button, I want to keep refreshing the value in the text field based on a loop.
    What I see is the the text field is only updated at the end of the loop, while the console prints out the new value of "i" on every iteration. Can you please point me to how I can update the value of the text field on each iteration..like a counter?
    private void movieButtonActionPerformed(java.awt.event.ActionEvent evt) {
    int i = 0;
    while ( i < 10000)
    this.seatStatusTxt.setText("Playing Movie " + Integer.toString(i));
    System.out.println(i);
    i++;
    }

    I recommend that you use Swing (JButtons, JTextFields, etc...) and a Swing Timer. Read up on these at the Sun Swing tutorials.

  • Why cann't rmic find the class?

    I have write some RMI Code,and I could compile them correctly,but when I wanted to generate Stub and Skel by rmic ,it showed me that:
    E:\JavaPro\CH21-05>rmic RmiTestServer
    error: Class RmiTestServer not found.
    1 error
    I don't know why?
    Here the source which helps to understand the problem:
    //Code in RmiTest.java
    import java.rmi.*;
    public interface RmiTest extends java.rmi.Remote
         //Definate an interface from java.rmi.Remote
         public float getRmiTest(int r) throws RemoteException;
    //Code in RmiTestServer.java
    import java.rmi.*;
    import java.rmi.server.UnicastRemoteObject;
    import java.lang.Math;
    public class RmiTestServer extends UnicastRemoteObject implements RmiTest
         //load the constructor of UnicastRemoteObject
         RmiTestServer()throws RemoteException
              super();
         //The client will send the parameters to here,and calculate,and get the results back
         public float getRmiTest(int r)throws RemoteException
              float circlerate=(float)(2*Math.PI*r);
              return circlerate;
         public static void main(String args[])
              try
                   Naming.rebind("//127.0.0.1:1099/RmiTestObj",new RmiTestServer());
                   System.out.println("RMI Connecting...");
              catch(Exception e)
                   System.out.println("RMI can't connect... :"+e);
                   System.exit(-1);
    //Code in RmiTestClient.java
    import java.awt.*;
    import java.rmi.*;
    public class RmiTestClient
         public static void main(String args[])
              float circlerate=(float)0.0;
              try
                   //Set security manager according to security mechanism
                   System.setSecurityManager(new RMISecurityManager());
                   //Query remote object,and it's host address is 127.0.0.1 ,and it's port is 1099
                   //RmiTestObj is a byname of RMI logging on
                   RmiTest obj=(RmiTest)Naming.lookup("//127.0.0.1:1099/RmiTestObj");
                   //method to load remote object
                   circlerate=obj.getRmiTest(5);
                   //print the result
                   System.out.println("Total circlerate is : "+circlerate);
              catch(Exception e)
                   System.out.println(e.getMessage());
    How can I solve this problem?

    I made it by runing the following command line:
    rmic -classpath E:\JavaPro\CH21-05 RmiTestServer
    and it created two files: RmiTestServer_Skel.class and RmiTestServer_Stub.class
    Thank you very much!
    --Steven                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Why cann't i change the name of my songs or even e...

    can anyone help me
    i have nokia e7 i found that i cann't change name of my songs or even edit some details
    does these problem have solution
    please help

    yes me too i have nokia e7 and i have the same problem
    please help .

  • Help:why cann't open socket through registry?

    This is an example from book,but i cann't register the object in the registry.
    and the file %JAVA_HOME%\lib\ext\java.policy has the line:
    permission java.net.SocketPermission "localhost:1024-", "listen";
    it means u can use port 1099.
    but when i run java RegisterIt,an error occured.
    message as follow:
    G:\javasource>java RegisterIt
    Object instantiated:HelloServer[RemoteStub [ref: [endpoint:[192.168.0.166:1734](
    local),objID:[0]]]]
    java.rmi.ConnectException: Connection refused to host: 192.168.0.166; nested exc
    eption is:
    java.net.ConnectException: Connection refused: connect
    //the RegisterIt.java source.
    import java.rmi.*;
    public class RegisterIt{
    public static void main(String args[]){
         try{
              HelloServer obj=new HelloServer();
              System.out.println("Object instantiated:"+obj);     
              Naming.rebind("/HelloServer",obj);
              System.out.println("HelloServer bound in registry");
         }catch(Exception e){
              System.out.println(e);
    }

    check if rmiregistry is running on the default port(1099) on your localhost.
    If not, run it like this on unix.
    $ rmiregistry 1099&
    I assume your HelloServer's implementation is fine.
    regds,
    CA

  • Why cann't export iMovie project to camecorder?

    I'm using iMovie HD and just finished eidting a 30 minutes project.
    Now i want to export it to a mini DV in Sony DCR-HC20 camecorder.
    Everything seems fine except there's no image on the sreen of the camecorder...I stopped the exporting/sharing and checked the DV tape. No image has been recorded/transferred.
    Can anyone give me some suggestion to solve the problem??
    Thanks in advance!!

    ...I think Apple products are not well designed at all. There's conflicts between different programs and constentally updating....personally, it bothers me. ...
    to quote myself:
    The last "clean install" on my Cube was 10.0.... until today just "upgrades"... and no free alphas from www.warez.ru (apologize to our Russian friends); repairing permissions after every install (just 29 apps in use here), running cron jobs once in a while...
    stable system, less then <1% problems discribed in this forums...
    to do an diagnosis, why a special app doesn't run as wanted, needs precision in discribing and dicipline in following advice... </i>
    Apple products ARE well designed, I made my choice '86 and I never regret it. Especially the PERFECT integration and workflow of all Apple products, hard- or software, are the main advantage of Mac systems (I do know lots of PC users... out of the box, the machines run well/besides wurms&virusses, but after installing a few app.... boom). And the updates are an offer to upgrade/of improvement, know many people still using 10.2, running smooth. . I never lost my most recent version of the edited project.. that is a user's mistake. no projects just "vanish".
    if you know something better for you and your needs... you have the freedom of choice too

  • Why cann't my applicatio​n print my report?

    My Labview programe can work well until I use the tool "Building a Stand-Alone Application or Shared Library" .I want to change my program to be a *.exe file. The matter is that my printer can not print the report.what can I do?
    I use Labview 6.02.
    I am hunger for your answer.

    Hi.
    I experienced almost the same problem. I could run and print report on my computer with FDS Labview 6.0.2, but after distribution of stand alone application I received error message: "oleautomg.cpp line 364" and no printed report. I am using W98 on both computers.
    I contacted NI, but they did not give me any useful advice. So I temporarily solved this problem by creating Excel report with minimized window, so user does not see anything on the screen. I am still looking for solution to work through normal report. On my opinion application builder does not pick up some *.dll that is necessary to print standard report.
    Hope you will find some good solution and post it in here.
    Good luck,
    Peter.

  • Why cann't I make calls even though I have subscri...

    I just subscribed for a month unlimited. I made three calls to China. But after that I cannot call any number no matter it's China or America. Who can help me? Thanks!

    contact customer service
    TIME ZONE - US EASTERN. LOCATION - PHILADELPHIA, PA, USA.
    I recommend that you always run the latest Skype version: Windows & Mac
    If my advice helped to fix your issue please mark it as a solution to help others.
    Please note that I generally don't respond to unsolicited Private Messages. Thank you.

  • Why cann't I open the attachment files sent to me by e-mails?

    Hi there,
    I have a question.  I receive e-mails with attachment file.  When I clicked at the file, message popped up: Adobe reader cannot open this file. It was sent by e-mail attachment but was incorrectly decoded.  How can I resolve this problem?
    Thank you.

    Nelly, this is a user to user forum; no Adobe personnel is assigned to answer questions here, so you cannot expect instant replies.
    Without further information, I would suggest asking for the PDF file (I am assuming that it is a PDF file) to be sent again but in compressed (zipped) form.

  • Help: Why cann't I install WebLogic Integration?

    Hi,
    I have installed WebLogic Server 6.0 on e:\bea (Windows 2000). When I
    install WebLogic Integration 2.0 sp2, I get the message "WebLogic Server 6.0
    is a prerequisite for this installion, you do not seem to have it installed
    to e:\bea". How can I do?

    I have the same problem like yang.
    I use 6.0.sp2 !
    Any ideas?
    Maik
    "Christo" <[email protected]> wrote:
    Is it 6.0 SP2?
    "yang songqi" <[email protected]> wrote in message
    news:[email protected]..
    Hi,
    I have installed WebLogic Server 6.0 on e:\bea (Windows 2000).When I
    install WebLogic Integration 2.0 sp2, I get the message "WebLogic Server6.0
    is a prerequisite for this installion, you do not seem to have itinstalled
    to e:\bea". How can I do?

  • Why cann't I install Oracle9i database?

    I want to install Oracle9i Enterprise Edition Release 9.2.0.1.0 on my comuptuer,the info of my comupter is below:
    Pentium II 566M
    ram 192M
    virtual Memory :384M
    OS:Windows 2000 server SP4
    When installed,an error "areasqueries" ,
    occured.
    What should I do?

    Hi,
    It is recommended that always have PIII 500 MHz Processor for installaing Windows 2000 server.
    Processor = PIII 500 MHz or above
    OS = Windows 2000 AD Server or Pro
    RAM = 256 MB
    Virtual Mem = 2* RAM Size
    HDD Space = 3 GB and above
    Upgrade your system and install.
    Kamalesh JK

  • Why cann't firefox mobile display PDF script based dropdown menus like the windows version can?

    We use a pdf with active javascripts that allow us to populate field B base on what is entered into field A. This works great in windows based computers running firefox but does not work on our android devices.
    The java script works great on Windows system with Firefox.

    Would you provide a sample or test page of what you are trying to accomplish?

  • Help! why cann't my solaris connect to lan

    I try to install solaris 9 on the following
    asus a7v8x-x motherboard
    3Com 3c905b-txnm ethernet card
    my computer can connect to lan under windows
    but It fail to connect to the LAN during installation.
    I choose "networks" and "DHCP" but, the DHCP network can't be reached.
    I found there are an onboard LAN port on the motherland, is this the fail reason?
    has anyone installed solaris on such hardware?
    help please, it almost drive me crazy:(

    Hello and Welcome to Apple Discussions. 
    The age of the PC is irrelevant to this Wireless connection because you are connecting direct to the Wireless Router. However I very much doubt that PC meets the minimum specs required for iTunes/iPod touch syncing.
    Assuming you sync the iPod else where we still need to know more details about that router, so as Jonathan asks, what encryption do you have in place? Do you have MAC address filtering enabled? What brand and model number is the router?
    mrtotes

Maybe you are looking for

  • Can anyone help to check if this seq can open/run in teststand2013 32bit?

    this seq was created by V2014 32bit and saved as V2013(5.1X) format. but it can't be opend in another computer with teststand 2013 32bit and shows error: "your file (saved with TS 2014) is incompatible with our version of Teststand (2013)" I have to

  • Lost iphoto on desktop

    When I try to open iphoto the main window does not appear, yet if I take a screen shot it appears in the shot that has been taken of the desktop. I've checked if hiding is on off etc. There is still 40 gbs of stuff in the application window when i cl

  • Transactional iview as link

    Hi, Can i know ,how can i show a transactional iview as a link in an iview. Regards, Raju

  • Can't connect from Mac using ethernet, plz experts help me.... :(

    I just got a new MacBook Pro, and it's connected to the internet using a 3G wirless modem, whan I try to shear this connextion with my STB box "AzBox Premium HD" i tells me that it's connected but I found no internet connection on the STB. I tryed to

  • CME dial-peer PSTN call

    Hello I have 2 CME PSTN===>CME01===LAN==>CME02 please see attached file with dial-peer config problem: ip phone 1299 can call 07733XXXXX (PSTN phone) ip phone 1484 can call 1299 but cannot dial 07733XXXXX(PSTN phone) please can you help