Refresh the applet !!!!!!

We developed an internationalizated applet with jdk1.3.0 and we used hide and show functions
to repaint the applet and obtain the applet with the new language selected.
Now in Swing with jdk1.3.1 hide and show are deprecated and the setVisible doesn't do the same.
We have tried some options, here you have the code of the function that realizes the change of
the idiom:
private void canviIdioma( String str )
if( str.equals( "Angl?s" ) )
language = new String( "en" );
country = new String( "US" );
if(str.equals( "Catal?" ))
language = new String( "ca" );
country = new String( "CA" );
currentLocale = new Locale( language,country );
missatges = ResourceBundle.getBundle( "ResourceBundle",currentLocale );
myCollator=Collator.getInstance( currentLocale );
repaint();
System.out.println(missatges.getString("titol1"));
// getContentPane().invalidate();
// getContentPane().validate();
// setVisible(false); //hide
// setVisible(true); //show
// hide();
// show();
// invalidate();
// repaint();
// revalidate();
// getContentPane().revalidate();
// doLayout();
// setVisible(true);
The change of the idiom is done correctly because the System.out.println writes the correct string.
What must we do to repaint ?
Thanks

The only thing which comes to my mind now is that you are not specifying what to repaint.
If the applet is in the same class, try
this.repaint();
If you the applet in a different class like
class hello extends applet
//code
then you can call
hello.repaint();

Similar Messages

  • How can i refresh the applet context

    I want to make my applet refresh after some time that is 10 seconds.
    i want to change the picture on the applet by this time please tell me how to do this i have used
    public void repaint(long time);
    But this did not work for me
    thanx Alot

    hi,
    you need a thread which will sleep for 10 seconds, call repaint() and then goes to sleep again. Something like this:public class MyApplet implements Runnable
      private Thread repaintThread = null;
      public void run ()
        while (true)
          myThread.sleep (10000);
          repaint();
        // + catch Exceptions
      public void init ()
        myThread = new Thread (this);
        myThread.start();
    greetz,
    Stijn                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Printing from a applet toolbar the image displayed in the applet

    Hi ,
    I have a JApplet which displays a tiff image. The applet uses JAI API and Java 2D for printing. I can zoom in . zoom out , invert the image and I am printing the displayed image also .
    In the action handler class for the print button , I have made an inner class implementing printable and executing the print function.
    I am doing printing via a separate thread as i don't want my action handler class to keep waiting till the image gets printed . The user should be able to manipulate the image after it has clicked on the "ok" of the print dialog, while the image is being printed. This is the reason for printing the image in a separate thread
    and the actual printing process is a synchronized method called by the run method of the thread .
    If I click on print button twice , one after another , the second image gets printed only after I get a response from the printer that image has been printed as expected (as the print method is synchronized ).
    In the action handler class of print , I do not call join on the thread as I do not want it to wait for printing to get over ( printing of a tiff image actually takes a long time ?? )
    Is there anyway to make the threads independent of the main applet . Like after firing the print command , if I close the applet and I haven't got a confirmation from the printer, I get a blank page or nothing but i get a response message from printer that printing is done .
    Is it essential for a thread to wait till the printer sends a response that printing is over ?
    Similarly , If after firing the printing command and without waiting for the confirmation from the printer , I refresh the applet , proper printing does not occur but I get a message from the printer that printing is done .
    If i use synchronized method for printing and wait till the printer response from the printer comes without closing or refreshing the applet , printing occurs fine .
    Can anyone please tell me what is actually happening and is there a better way to print and that printing occurs after the print command has been fired irrespective of the applet ?
    Regards , Navneet

    Hey can you send me the code for the same. I know its been a long while, but I am new to JAI and need the same stuff u coded. u can mail it to me on [email protected]
    Thanks in advance.

  • Refreshing Swing Applet

    I have an applet (javax.swing.JApplet) running with textarea. I am updating the text area for each successful process. When the application is running, if any other window is opened, then minimised, the applet window will have the print of the opened window. I mean, that will not show the exact applet window it is suppose to show. even i tried repaint(), validate() methods to refresh it.
    When there will be always a process running updating textarea. how can i refresh the applet ?

    repaint();

  • Refreshing an Applet

    hi Group,
    I have an applet which initially asks the user to authenticate himself, by presenting a login screen. Upon successful authentication, i want to present some more UI components on the applet, on the fly.
    Now, how do i dynamically stick in a few more components and refresh the applet so that the new applet has the old as well the newly added components.
    I tried calling the init() method after adding the components, but it renderes the components twice.
    I would highly appreciate any tips from the gurus regarding this.
    Thanks and Regards,
    Ranjit Iyer

    Thanks for your respective tips..
    Ya i will try either of those 2 options. Indeed using CardLayout also makes complete sense in such a situation. It never struck me.
    A solution suggested by my professor was to initially layout all the components that would ever be necessary on the Applet but set some of them to visible(false) and then set them to true as and when needed.
    Thanks both,
    Regards,
    Ranjit

  • Hi,  Trying to log in with my user id and password at iocbc but was not able to access. Problem message shown : Applet not initialised or may not be supported. Please refresh the page or check the browser setting  Anyone can advise? or i need to download?

    Hi,
    i have the same problem?
    Trying to log in with my user id and password at iocbc but was not able to access.
    Problem message shown : Applet not initialised or may not be supported. Please refresh the page or check the browser setting
    Anyone can advise?

    You need to install Java for your Mac OS version, and/or make sure it's enabled in the Java Preferences application and your browser's preferences.

  • Can someone tell me how to change obj file in the applet

    Thanks in advance.
    I have try to use the ObjLoad example in the java3d demo to
    change the obj file.But I fail to do this.
    I had use twe applet,one to change name,and then refresh the other
    frame to try to relod th obj file. but
    java.lang.NullPointerException
    at ObjLoad.init(ObjLoad.java:150)
    at sun.applet.AppletPanel.run(AppletPanel.java:348)
    at java.lang.Thread.run(Thread.java:536)
    can you help me?
    thanks

    Sun's Java3d FlyThrough Demo & Java3d Scenegraph Editor
    allow you to load mutiple 3d files (sequencially) including VRML
    files with the Sun VRML Loaders at run-time
    -- and the Java Source Code is free --- ( see below )
    First, try a Web Demo of the "Appearance Explorer" :
    "Appearance Explorer" Java3d Web Applet, Loads multiple ".obj"
    http://web3dbooks.com/java3d/jumpstart/AppearanceExplorer.html
    - click on "Data"
    - click on "Obj File: Galleon" -- or -- "Obj File: Beethoven"
    - rinse, rather, repeat.
    |
    http://web3dbooks.com/java3d/jumpstart/Java3DExplorer.html
    http://web3dbooks.com/java3d/jumpstart/J3DJumpStart.zip
    | ^-- free source code
    |
    http://www.frontiernet.net/~imaging/games_with_java3d.html
    | Sun's Java3d Scenegraph Editor showing a Nasa VRML model
    | --------------------------------------------------------
    |
    | uses the Sun VRML Loaders, source code available and is free.
    |
    | [ at this url: ] http://java3d.netbeans.org/j3deditor_intro.html
    |
    http://www.frontiernet.net/~imaging/terrain_rendering.html#Scenegraph_Editor
    http://www.frontiernet.net/~imaging/terrain_rendering.html
    Selman wrote a Java3d book that was well received
    and has a Swingtest.java applet and application that
    allows you to load objects dynamically,
    ie. "change" the viewed object when it is running by
    allowing the user to select "sphere" or "cube" from
    menu lists ( in this case it's not just displaying
    Jav3d primative objects, but it has the core functionality
    of deleteing and adding nodes in the scene graph that you
    are seeking, and at that point the rest is left as
    exercise to the student. The ObjLoad.java in Sun's Demos
    directory has the code to load ".obj" files, so you have
    all the tools you need.
    | Picking of VRML objects with your mouse is demonstrated
    | in a new book, Java 3D Programming, by Daniel Selman
    | ( shown on the left ).
    |
    | The source code is avaible for free.
    |
    | [ here: ] http://www.manning.com/selman/selman_source.zip
    |
    | This new book uses the old, reliable Sun VRML Loaders for Java3d.
    |
    | The program reads a 3d scene as a simple VRML text file,
    | and displays the Java3d Scene Graph ( which is interactive,
    | you can expand and collapse the branches of the scenegraph
    | and examine the contents of the nodes ), it renders the
    | 3d scene, and when you click on an object it tells you
    | what you clicked on.
    |
    | You can see ( and download ) the Java Source code of
    | the operative file: VrmlPickingTest.java
    |
    | The publisher's site has more informatation on the book.
    |
    http://www.frontiernet.net/~imaging/games_with_java3d.html
    http://www.frontiernet.net/~imaging/sourcecode/VrmlPickingTest.java
    The Prentice-Hall books by Aaron Walsh are false & fraudulent
    in their claims to present the most current methods, as a part
    of the "Couch-Beiter Flame War" and fraud involving Sandy Ressler
    at the NIST. Prentice-Hall, Yumetech.com and Aaron Walsh have
    misrepresented and disparaged the old & reliable Sun VRML Loaders
    in favor of the "new" Yumetech.com Loader, and the web demo above
    __ DOES NOT __ load Web3d.org's __ VRML __ files, only the less
    capable ".obj" files ... so the "Web3d" series of books from Prentice-Hall
    does not show the loading of ___ Web3d.org 's ___ VRML __ files
    because Sun's VRML Loaders were the best ones, and the Yumetech.com
    folks didn't want anyone using those, and started the "Couch-Beitler Flame War"
    to disparage, falsely & fraudulently misrepresent the facts and knowingly
    published false and misleading "disinformation" in the
    unreliable Prentice-Hall / Pearson Ed books, harming our community.
    The Sun VRML Loaders are used by __ Nasa, __
    the NSF supported Virtual Chemistry Lab ( "Lab3d" ),
    me, and others simply choosing the "what works best",
    and by people using Sun's Java3d FlyThrough & Java Scenegraph Editor.
    symsan wrote:
    |
    | Thanks a lot,but can you give some code
    | about to change the Obj file or vrml file,
    | when the user in the browser to choose
    | the file or input to the textField ?
    |
    I misunderstood the original question ( it was too terse ).
    I interpreted the question has how to change the loaded
    objects --- between successive runs of the program ---
    and not as you intended -- dynamicall while running
    the program program without quiting & restarting.
    In a "Java3d" forum I'm not going to wander into
    how basic ( non-Java3d) 2d commonents such as TextFields
    are programmed.
    The original Vrml97Player.java file that came with
    Sun VRML Loaders also implemented the functionality
    of loading mulitiple files ( sequentically during one run )
    and I have worked with that and similar things with
    the Shout3d.com engine and my own 3d Java engines.
    -- Paul, Java Developer & Web Animator
    Imaging the Imagined: Modeling with Math & a Keyboard

  • Button click without "refresh" the current page. Please help

    Hi everyone:
    Here is my code:
    Code:
    <HTML>
    <HEAD>
    <TITLE>Parallel Port</TITLE>
    </HEAD>
    <BODY>
    <H1 ALIGN="CENTER">On/Off Bit0 of server's parallel port</H1>
    <form name="myform" action="robotcontrol.jsp" method="POST">
    <input type="hidden" name="action" value="<%=action%>">
    <INPUT TYPE="SUBMIT" VALUE="set/reset">
    <jsp:include page="./VideoToApplet/htmlroot/index.html" flush="true" />
    </form>
    </BODY>
    </HTML>
    everytime i click the button, it will perform (set/reset) parallel port, and i have include a html page which consist a video streaming applet.Maybe cause of this:
    <form name="myform" action="robotcontrol.jsp" method="POST">
    So.. please help !! Thanks in advance.
    but unfortunately, everytime i click on the button, it will likely refresh the page, and the applet will auto reconnect to camera,(it take time to reconnect)..

    Inside the body of JSP/HTML page, at the end of <BODY>, paste this small script.It will refresh your page automatically after 20 seconds, that is nothing but the value assigned to V.You can assign the time interval as you wish.
    <SCRIPT language="javascript">
         var ONESEC = 1000 ;                    // One second (in ms)
         var V = 20 * ONESEC ;
         var ONEMIN = 60 * ONESEC ;     // One minute (in ms)
         var INTERVAL = 1 * ONEMIN ;               // How often is page refreshed (in ms)
         window.setTimeout(function(){
                                            window.location.reload() ;
                                            },V) ;
    </SCRIPT>

  • Refresh an applet

    Here is my code. In the fonction start(), i have a "automate" that set visible one panel depending on the variable "etat". The others panel are setVisible(false)
    That was my theory !
    Under IE 5.5 or Opera 5, this automate doen't work. When i come for the second time in the automate , the variable etat is at 2 but the panel "panneau_2" is not loaded until i change the size manually of the window of opera, what make the window refresh and then it works !
    Can i refresh it in the code ??
    I try repaint, i try to destroy the applet and then to call init(), ...
    Here is my code
    Thank you
    // Import des classes Java
    import java.applet.Applet;
    import java.awt.event.*;
    import java.lang.Object;
    import java.awt.Graphics;
    import IHM_client_affaire;
    import database_manager;
    import DB_client_affaire;
    import IHM_connection;
    import DB_connection;
    import IHM_ft;
    import DB_ft;
    import IHM_panneau_FT;
    import DB_panneau_FT;
    import IHM_signalement;
    import DBB_signalement;
    /** Classe principale de lancement de l'applet */
    public class principal extends Applet implements ActionListener
    private int fonction;
    private int exit = 0;
    private int etat = 1;
    private int etat_modification_client = 0;
    private int etat_ajout_valid_2 = 0;
    private int etat_signalement_ajout_valid_3 = 0;
    private int etat_FT_ajout_valid_3 = 0;
    private IHM_connection panneau_1 = new IHM_connection(this);
    private IHM_panneau_FT panneau_2 = new IHM_panneau_FT(this);
    private IHM_client_affaire panneau_3 = new IHM_client_affaire(this);
    private IHM_signalement panneau_4 = new IHM_signalement(this);
    private IHM_ft panneau_5 = new IHM_ft(this);
    private IHM_nouvel_utilisateur panneau_6 = new IHM_nouvel_utilisateur();
    /** Initialiser l'applet */
    public void init()
    // this.removeAll();
    System.out.println("coucou2");
    setLayout(null);
    add(panneau_1.get_pane());
    panneau_1.setVisible(false);
    add(panneau_2.get_pane());
    panneau_2.setVisible(false);
    add(panneau_3.get_pane());
    panneau_3.setVisible(false);
    add(panneau_4.get_pane());
    panneau_4.setVisible(false);
    add(panneau_5.get_pane());
    panneau_5.setVisible(false);
    add(panneau_6.get_pane());
    panneau_6.setVisible(false);
    System.out.println("coucou3");
    public void start()
    switch (etat)
    case 1 : panneau_1.setVisible(true);
    panneau_2.setVisible(false);
    panneau_3.setVisible(false);
    panneau_4.setVisible(false);
    panneau_5.setVisible(false);
    panneau_6.setVisible(false);
    this.setSize(983,571);
    break;
    case 2 :
    panneau_2.setVisible(true);
    panneau_1.setVisible(false);
    panneau_3.setVisible(false);
    panneau_4.setVisible(false);
    panneau_5.setVisible(false);
    panneau_6.setVisible(false);
    if (etat_modification_client == 1)
    {panneau_2.rebuild();}
    this.setSize(984,572);
    break;
    case 3 : panneau_1.setVisible(false);
    panneau_2.setVisible(false);
    panneau_3.setVisible(true);
    panneau_4.setVisible(false);
    panneau_5.setVisible(false);
    panneau_6.setVisible(false);
    if (etat_ajout_valid_2 == 0)
    {panneau_3.rebuild_ajout();}
    else if (etat_ajout_valid_2 == 1)
    {panneau_3.rebuild_valid();}
    this.setSize(981,570);
    break;
    case 4 : panneau_1.setVisible(false);
    panneau_2.setVisible(false);
    panneau_3.setVisible(false);
    panneau_4.setVisible(true);
    panneau_5.setVisible(false);
    panneau_6.setVisible(false);
    if (etat_signalement_ajout_valid_3 == 0)
    {panneau_4.rebuild_ajout();}
    else if (etat_signalement_ajout_valid_3 == 1)
    {panneau_4.rebuild_valid();}
    this.setSize(981,569);
    break;
    case 5 : panneau_1.setVisible(false);
    panneau_2.setVisible(false);
    panneau_3.setVisible(false);
    panneau_4.setVisible(false);
    panneau_5.setVisible(true);
    panneau_6.setVisible(false);
    if (etat_FT_ajout_valid_3 == 0)
    {panneau_5.rebuild_ajout();}
    else if (etat_FT_ajout_valid_3 == 1)
    {panneau_5.rebuild_valid();}
    this.setSize(982,569);
    break;
    case 6 : panneau_1.setVisible(false);
    panneau_2.setVisible(false);
    panneau_3.setVisible(false);
    panneau_4.setVisible(false);
    panneau_5.setVisible(false);
    panneau_6.setVisible(true);
    this.setSize(983,569);
    break;
    public void actionPerformed(ActionEvent event)
    }

    Try:
    1. public void doLayout()
    http://java.sun.com/j2se/1.3/docs/api/java/awt/Container.html#doLayout()
    2. public void update(Graphics g)
    http://java.sun.com/j2se/1.3/docs/api/java/awt/Container.html#update(java.awt.Graphics)
    Vishal

  • Maximizing the applet's window

    We are converting the forms/reports to run in the Application Server. When you run on the web, an applet starts the forms converted.
    In the older version of forms we use the trigger WHEN-TIMER-EXPIRED to refresh an application, so the user could be working in other task and when the time expired, we were using the win_api to show again the window refreshed.
    Now, when the window that is running the applet is minimized how can I maximize it using the time expired ?
    Urgent,
    Thanks.

    Can you not use the same win api to bring up the browser application, since the applet is running within the browser?

  • Not having to refresh the data in the main report but only in the subreport

    Hi SAP,
    I have a report that uses a stored procedure in the main report and uses regular database tables in the subreport.  The data returned from the stored procedure reports information from the month-end database (a cutoff point from the previous month's numbers) while the subreport reports information from the live database.  This report gets run everyday to show the changes in numbers from the live database.  Obviously the numbers from the month-end database remainds static until the next month's cutoff database is created. 
    My problem is that everyday when I run the report, the data needs to refresh from both the stored procedure in the main report and the live database tables in the subreport.  How can I leave the data returned from the stored procedure static or as is without refreshing the stored procedure returned data and just have the subreport data refresh itself?  The stored procedure really puts a strain on the database and I would like to cut-out the time to process the report as well.  Does anyone have any ideas?
    Zack

    Hi Zack,
    Try the following under Report options.
    1. Clear the check box of "Verify Stored Procedures on First Refresh" in the Main report.
    2. Select the check box of "Verify on First Refresh" in  the sub report.
    Hope this helps.

  • Can not refresh the metrics in schedular

    Post Author: sachinddalal
    CA Forum: Performance Management and Dashboards
    Hi,
    When I refresh the metric using schedular, the metric is not refreshed , nor schedular return any error. But when checked in metrics proparties, the last refresh date is not changed, niether the values are updated.
    Whe I try to refresh the metric manual, the values are refresh.
    Please help me to troubleshoot the problem of refreshing metric through schedular.
    Thanks,
    Regards
    Sachin Dalal

    Post Author: jezbraker
    CA Forum: Performance Management and Dashboards
    Scheduler is pretty horrid for refreshing metrics.Better of to use the Rules engine and create a rule thats based on a schedule that based on condition (1=1 works well ) then refreshes metircs.troubleshooting is best done with the trace options in setup/parameters.there are a few other ways or seeing what the schedulers up to - but id stick to rules if i were you.

  • How can I fast refresh the  materialized view !!

    I created a MV base on some tables in order to improve the querey speed.
    but the mv I have created falied to refresh fast.
    because there are two same table in the from clause:
    jcdm jc1,jcdm jc2
    create materialized view temp_mv
    nologging
    pctfree 0
    storage (initial 2048k next 2048k pctincrease 0)
    parallel
    build immediate
    refresh force
    on demand
    as
    select
    TAB_GSHX.rowid hx_rid,
    TAB_GSHD.rowid hd_rid ,
    JC1.rowid jc1_rid ,
    JC2.rowid jc2_rid ,
    YSHD_ID     HXID,          
    JC1.JCDM     QFD,     
    JC2.JCDM     JLD     
    FROM
    TAB_GSHX,
    TAB_GSHD,
    jCDM JC1,
    JCDM JC2
    WHERE
    YSHD_ID=YSHX_ID
    AND YSHD_QFD=JC1.JBJC_ID
    AND YSHD_JLD=JC2.JBJC_ID
    AND TO_CHAR(YSHX_time,'YYYYMMDD')='20030101'
    the column msgtxt of the table MV_CAPABILITIES_TABLE is :
    "the multiple instances of the same table or view" and " one or more joins present in mv".
    How can I succeed in fast refresh the above temp_mv!!!
    thanks.

    lianjun,
    When you are using Oracle9i there is a procedure which can help you setup the materialized view. If some option isn't working it gives you hint why it doesn't work.
    The procedure is dbms_mview.explain_mview.
    Take a look at the documentation how to use it. (In the Oracle9i DWH guide the package is explained.)
    Hope this helps
    With kind regards,
    Bas Roelands

  • Refreshing the Data Source View in Analysis Services

    I have added columns to the SQL Database table that is used as a dimension in an Analysis Services Cube.  The new columns will be used as additional Property Fields for the dimension.  When I attempted to refresh the Data Source view so that the additional columns are present, I am given the following error:
    System.Data
    Property not accessible because 'Parent Columns and Child Columns don't have type-matching columns'
    I have done nothing to the columns used for the parent of child and the error message provides nothing to gon on. Does anyone have any ideas on this?
    Gary

    Olga,
    Thanks for your response.  I will try and answer your questions
    1) I have not tried removing the columns yet.  I will try that this afternoon but have limited hope.  The two columns I added are simple text columns that will be used as attributes in the dimension.  I have made no change to the parent or child columns.
    2) The table I modified is the source table for a parent-child dimension.
    3) The reference to the "check list" does not take me to any kind of check list.
    4) The parent-child dimensions I am trying to modify have been in use for months and the parent and child columns do have the dame data types.
    5) I have also check the data types between the dimension table and the fact table.  they use the same data types (small int).
    6) I have not made a collection for the parent key, it is a single column. The remainder of your last paragraph is not clear to me. Can you give me an example.
    I am fairly inexperienced with Analysis Services, please talk slow and use small words  :-)
    Thanks again for your help!
    Gary

  • Visio Diagram is not refreshing the data from list

    Hi,
    I made a pivot diagram in visio 2013 and linked it with SharePoint 2013 list. I configured the Visio services, uploaded it document library. I can view the diagram in browser but it is not automatically refreshing not even by pressing the "Refresh"
    button.
    Instead i have to open it in visio, refresh the diagram manually and the save it in SP document library to refresh the diagram.
    I am using visio web access to view the diagram and also the auto-refresh is enable. 

    Hi Rizwan,
    Following url's might help you.
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/79476e70-51cf-412a-aac9-ebb10e82572f/2010-visio-services-data-refresh-issue
    http://social.technet.microsoft.com/Forums/en-US/06d53cb3-2593-4dd0-a524-356bd9720231/visio-service-data-refresh-help
    Regards  Roy Joyson
    Please remember to mark your question as "answered"/"Vote helpful" if this solves/helps your problem.
    Roy Joyson

Maybe you are looking for

  • Problem in adding attributes to an iView

    I am facing some problems while working with PCD api. My requirement is to get an existing iView and add attributes to that. I am using the below code to do this. My problem is that 1.  I am not able to add attributes using obj.addToEnvironment("test

  • Bug when using IBOT

    Hi all, has anyone had this kind of error? I am using IBOT, and I set Schedule_ to Start Date=21/09/2009, Time of Day=08:00, Set Time Zone=GMT+01:01, and Recurrence_ to Every 1 week(s) on  MON. When I look overview of this IBOT, everything is fine, b

  • Re: Cancel Billing Document

    Hi Experts, Good Morning to all, I have a problem i want to cancel a Billing document in VF11 which posted in other country currency. So i went to VF11 and given the Billing document number the system says an Error Log so i went to Menu Tool bar of E

  • Why can't I use the Develop module?

    I bought the stand alone version of Lightroom so I would not have to subscribe monthly. Now it is not letting me use the "Develop" module. Please tell me I do not have to have a subscription after I bought the full program.

  • Oracle CRM E business Suite Resource

    Dears, Please can anyone provide me any good resource on oracle CRM I am new on this module. Thanks in advance,