Remove/add panel to applet speedy in 1.3.x; painfully slow in 1.4.1/2.beta

The following code (which was working for years, including even 1.3.x) suddenly fails in 1.4.1 and 1.4.2beta on both win 2000 and win xp
DESCRIPTION OF PROBLEM :
An applet consists of 2 components: a contents panel and a button. The contents panel consists of one of several panels of components which are swapped at run-time. The first time a panel is added, the applet works fine, but subsequent additions of the "cached" panel cause 1.4.1 and 1.4.2beta to go to 100% utilization and take 10 seconds before properly displaying the panel.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Load applet described above (and whose short complete example is reproduced below), then click on button "Swap Contents". Each click should swap the contents between 2 panels very quickly. 1.3.x releases did all swaps quickly as expected. Suddenly, in 1.4.1 and 1.4.2beta, the first click is fine, but subsequent clicks are painfully slow.
---------- BEGIN SOURCE ----------
// Java code to reproduce bug followed by html file to load applet
import java.awt.*;
import java.awt.event.*;
public class TestRemoveAddApplet extends java.applet.Applet {
Container contentPanel = new Panel();
Button button = new Button("Swap contents");
Panel contents1 = new Panel();
Panel contents2 = new Panel();
Label contentsL1 = new Label("Contents #1");
Label contentsL2 = new Label("Contents #2");
Component current = contents2;
public void init() {
setLayout(new BorderLayout());
add(contentPanel,"Center");
add(button,"South");
button.addActionListener(new Swap());
contents1.add(contentsL1);
contents2.add(contentsL2);
// initialize contents
swapContents();
class Swap implements ActionListener {
public void actionPerformed(ActionEvent e) {
swapContents();
void swapContents() {
current = (current == contents1 ? contents2 : contents1);
// remove contents of previous contents panel
contentPanel.removeAll();
// display new contents
contentPanel.add(current);
validate();
HTML file follows:
<HTML>
<HEAD>
<TITLE>Test Remove / Add in Applet</TITLE>
</HEAD>
<BODY>
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
WIDTH = 100% HEIGHT = 100% >
<PARAM NAME = CODE VALUE = "TestRemoveAddApplet" >
<PARAM TYPE = "application/x-java-applet;version=1.1" >
</OBJECT>
</BODY>
</HTML>
---------- END SOURCE ----------

Try hiding the panels first then adding them then show. I know its crazy but I have gotten better performance this way with 1.4.1x. Try it.
current.setVisible(false);
contentPanel.add(current);
current.setVisible(false);

Similar Messages

  • How can I remove Lion? Since the upgrade, my 2011 iMac is painfully slow :(

    Any help is sincerely appreciated. My iMac is my primary computer at work and is slowing me down. It ran Snow Leopard beautifully, but it just can't handle Lion. It's a 2011 27 inch model.
    Cheers
    Jeremy

    I updated last week and have had severely degraded performance ever since. It takes around 15 seconds to load launch pad, then even longer for the app icons to appear. If iTunes is playing, playback stutters constantly and it takes a long time for the next song to come on. It's a new machine so there's not much to index, I only have 1 folder with some photoshop files and an iTunes music folder. The only non-standard software I have is Microsoft Office 2008 and Adobe Photoshop CS5.

  • Realy no one knows how to remove the word "java applet window" besides sign

    Hi, everyone,
    I am trying to remove the line "java applet window" from my nice/colorful interface, but what I was told is that I can not remove if i do not sign for digital singiture. Is this really a limition of Applet?
    I do not know why t he design want to add this stupid feature. As most people are not technical people, they do not care whether it is applet or not. For technical people, they should know that some thing popup from the browser and have a "java" sign on the right top corner is Applet.
    Only too sad about that.

    In the browser window, the address bar will also display the correct URL for the page being displayed.
    An applet window could spoof this address bar and otherwise mimic the look and feel of the browser (or any other application), thus tricking the user into believing the window to be legitimate.
    Just because there are already potential security/privacy issues in the applet specification, doesn't mean we want to open up another one! Why do you want an unsigned applet with a window without a warning message? You'll need a certificate anyway if you're planning on using secure communication - sending client data across an unsecure connection is rather less professional than spawning a window with a well-known and generally-ignored warning message.

  • Removing Add-ons in Windows 7

    With Windows XP we were able to remove two .sbo files from local machines to have SAP reinitialize / reinstall the assigned add-ons when there were sisues, but that file structure does not exist in Windows 7.
    FYI:  the two .sbo files were:  AddOnsIInstall.sbo and AddOnsLocalRegistration.sbo.
    I have removed the two troublesome add-ons through the Programs section of the Control Panel and have removed the Application Data files (for SAP) along with the residual Program Files data (for SAP) and have even removed add-on info from the registry.
    Logging into SAP still does not prompt the add-ons to re-install.  Does anyone have a fix for this?
    I suspect there are other files I need to delete or I need to find those .sbo files somewhere.
    Thanks in advance folks!
    Regards,
    Dan Berube

    This procedure will enable you to "Run As " when installing a printer to windows 7
    1.      
    Control Panel – Administrative Tools
    2.      
    Shift + Right-click on Print Management
    3.      
    Select “Run as different user”
    4.      "
    Login as local administrator” and current administrator password
    5.      
    Expand Print Servers, expand local pc
    6.      
    Right-click on Printers
    7.      
    Select “Add Printer…”
    8.      
    Continue the normal procedure to add a printer
    Awesome! This works perfectly. I have been looking for this solution for forever! TYTYTY!

  • Add panel

    What I have is a JTable. When a row is selected (mousepress method) for the first time, a new panel appears in the frame(south of JTable). This new panel contains text fields with data appropriate to the row selected. When I select another row I expect the data in the panel to be updated. However what I get is 2 panels. When I dragged the corners of the frame I could see that the original panel (from first selection) was on top and the panel which should have been displayed from the second row selected was underneath????????
    Note the panels are displaying the correct data. That is not the problem, the problem is the previous panel is kept, while the panel that I require is displayed underneath and therefore hidden.
    see following code for rough idea:
    class{
    JPanel panel = new JPanel
    constructor(){
    panel.add(table,CENTER)
    frame.add(panel,CENTER)
    mousePressed(){
    JPanel panel2 = new JPanel;
    panel.add(panel2,SOUTH)

    Without reading your code, I'd suggest that instead of adding a panel when a row (or whatever) is selected, I'd add the panel with whatever textfields/labels to begin with and update the data when a row is highlighted.
    Either that or
    pane.remove(panel1);
    pane.add(panel2);
    But I've never been very successful with removing components. You might have to do it in the opposite order (add then remove).
    But if you can, go with the first solution.
    Hope this helps,
    Radish21

  • Can't remove Front Panels in Application Builder

    I have had a few issues using Application Builder (v7.1) in regards to it removing or not removing front panels for my subvi's when I was trying to compile. Here are the conclusions I came to if anyone else runs into the problems I had.
    Problem 1) Some of the front panels were being removed for dynamically loaded VI's, which were not set as dynamic VI's in the Application Builder, but which were static-linked VI's in the program (so they were loaded in memory as linked subvi's but called dynamically). When the Application Builder decided to remove the front panel for those VI's, there was an error when loading them dynamically.
    Problem 2) Some of the front panels were NOT being removed for subvi's that I didn't want to have their front panel built into the compiled program. Loading front panels that are not needed uses extra memory, but there was no way to change the option to not load the front panel for certain particular subvi's in Application Builder--the option was grayed out.
    For problem 1, I decided not to worry about linking the files dynamically in the Application Builder, but to just make sure the Application Builder would include their front panels. For problem 2, I had to figure out what was making Application Builder force the front panels to be included when I deemed it unnecessary, so that I could fix them not to be included. Basically then, going through my VI's that were forcibly included, I came up with a list of stuff I began checking for each time I would run into one where I didn't want to include the front panel. I have attached my list to this post.
    My solution for problem 1 was then to use a customized appearance for my static-linked / dynamically loaded VI's, and disable the menu bar (forces the front panel to be included by Application Builder without changing appearance, since I never actually see the FP). My solution for problem 2 was often to remove property nodes referencing text on the front panel controls. Sometimes I was able to perform a numeric->text or enum->text conversion instead of referencing the text of the control itself, and sometimes I realized I didn't want anything to change and that it was ok to include the front panel so I could (for example) get a list of strings for my enum control.
    I have attached the reference list I came up with of things to check for to make sure your VI properties are set correctly if you are trying to get Application Builder NOT to include the front panel of your subvi. The list might not be complete, but it's helped me to narrow down things very quickly and find the problems I was having.
    Attachments:
    ThingsToCheck.doc ‏61 KB

    m3nth wrote:
    Problem 1) Some of the front panels were being removed for dynamically loaded VI's, which were not set as dynamic VI's in the Application Builder, but which were static-linked VI's in the program (so they were loaded in memory as linked subvi's but called dynamically). When the Application Builder decided to remove the front panel for those VI's, there was an error when loading them dynamically.
    This is expected behaviour. The application has no way of knowing that these VIs will at some time be called dynamically. That would require analysing and understanding the entire program and in cases where you calculate the dynamic VI to be called at runtime it still wouldn't be feasable to do so.
    m3nth wrote:
    Problem 2) Some of the front panels were NOT being removed for subvi's that I didn't want to have their front panel built into the compiled program. Loading front panels that are not needed uses extra memory, but there was no way to change the option to not load the front panel for certain particular subvi's in Application Builder--the option was grayed out.
    There are several reasons why a front panel is needed. One of them is when the VI is called dynamically, even if the FP is never displayed and AppBuilder will account for that for VIs which have been added as dynamic VI to the project.
    The other is when a VI uses some Property Nodes or Attribute Nodes as they are called now.
    So to solve your problem 1) you could also just drop some property node in the diagram of such VIs and be done with it.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How to I remove the 'panel' underneath the Header list, and above the mail Preview pane. Contains 'from' 'subject' 'reply' buttons to name a few. Takes up too much space.

    How do I remove the 'panel' underneath the Header list, and above the email Preview Pane. Contains 'from', 'subject', 'to', 'reply', 'forward' buttons to name a few. Takes up space.
    == This happened ==
    Every time Firefox opened

    setSize (600, 200);orpack ();Kind regards,
      Levi
    PS:
        int i;
    parses to
    int i;
    , but
    [code]    int i;[code[i]]
    parses to
        int i;

  • Target movieclip from an AS3 class file - remove/add Child

    Halo.
    I have a very simple question  (for those who use external class files).
    Assuming that I have a MovieClip manually added to Stage and I want to access it from inside my class definiton.
    So the code would be:
    MovieClip(root).MyMovieClip
    But I can't figure out how to use remove/add Child in that kind of situation.
    I will appreciate any advice.
    Thanks

    if you can reference using that, you can remove using:
    MovieClip(root).MyMovieClip.parent.removeChild(MovieClip(root).MyMovieClip);
    and you can add to any displayobjectcontainer.

  • Add panels dynamically to a frame

    I have a main class called Mainframe. I want to be able to add panels dynamically to this. Lets take for example that I have 2 objects. The first one is called random1 and the other one is called random2. All they do is generate random numbers. I want the 2 of these to take up half the screen.I want random1 to be at the top with the remaining fitting in under them. I want this to be able to support whatever number is present at runtime.
    e.g.
    .MainFrame .
    .          Number:24          .     
    .          Number:66          .
    How can I achieve this?

    Please! no sarcasm, You arent giving qwwerty a chance to post his code.
    I'm sure he's got a lot to offer and just waiting for the right opportunity.
    Ok qwwerty, when you're ready....

  • Trying to add a simple applet to a web page

    Well, I was trying to add a simple applet to a web page(php nuke Home section), it didn't fin my applet, so I changed it and added it to a simple html file to make it as simple as I could get it.
    This is the code in the html file:
    <applet code="usblock.class" width="400" height="400">The browser doesn't support applets...</applet>The directory: www/usblock.html & www/usblock.java & www/usblock.class - As you can see the files are all in the same directory/folder.
    usblock.java code:
    import javax.swing.*;
    import java.awt.*;
    public class usblock extends JApplet
         public void init()
              JPanel p = new JPanel(new BorderLayout());
              p.add(new JLabel("Heisann"));
              add(p, BorderLayout.CENTER);
    }now as I open the html local on my computer, it workes. As soon as I open the usblock.html from my website, it doesn't.
    It gives me this error here:
    load: class usblock.class not found.
    java.lang.ClassNotFoundException: usblock.class
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: open HTTP connection failed.
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 10 moreSo I thought it was that it couldn't find the .class file. Well, I went through the How To add applets that I found somewhere on sun.com. It had exactly the same as I had.
    Im figuring the problem is something easy and not hard to detect. But my eyes can't find it somehow. This is my second time trying applets, and I kinda forgot how I got it to work the first time.
    Im just glad for all the help I can get.
    Thanks a lot.
    LordSvae
    PS: Sry for the size of the post, but I'm not sure how much info I was supposed to put in here, so I thought the more the better, right? :S

    Hii,
    I doesn't know the solution but same kind of problem is come with me & I found that the problem is of Path i.e. you need to set a codebase attribute . For tempory solution what i do i simply copy the .class file in to html file dir.

  • How do you identify and remove add-ons/extensions

    The explanation of how to remove add-ons tells you to click on menu (and then 3 parrelel bars) What menu is that? I figured out(by trying each and every menu until I figured out it was the tools menu. when I get to the last step it says click the remove button. There is NO remove button at that point (just an enable button which is the last thing I want to do. I am talking about the Cinema ploos extension. It represents it's self as an upgrade with many improved features, but all it is is an add bot that is noisy and obnoxious and they want a one time fee (extorsion) to remove it

    Application Basics
    Name: Firefox
    Version: 33.0
    User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:33.0) Gecko/20100101 Firefox/33.0
    Multiprocess Windows: 0/1
    Crash Reports for the Last 3 Days
    All Crash Reports
    Extensions
    Name: Cinema ploos
    Version: 0.95.5
    Enabled: false
    ID: [email protected]
    Name: DivX Plus Web Player HTML5 <video>
    Version: 2.1.2.145
    Enabled: false
    ID: {23fcfd51-4958-4f00-80a3-ae97e717ed8b}
    Graphics
    Device ID: 0x6740
    GPU Accelerated Windows: 1/1 OpenGL (OMTC)
    Vendor ID: 0x1002
    WebGL Renderer: ATI Technologies Inc. -- ATI Radeon HD 6770M OpenGL Engine
    windowLayerManagerRemote: true
    AzureCanvasBackend: quartz
    AzureContentBackend: quartz
    AzureFallbackCanvasBackend: none
    AzureSkiaAccelerated: 0
    Important Modified Preferences
    browser.cache.disk.capacity: 358400
    browser.cache.disk.smart_size.first_run: false
    browser.cache.disk.smart_size.use_old_max: false
    browser.cache.frecency_experiment: 1
    browser.places.smartBookmarksVersion: 7
    browser.sessionstore.upgradeBackup.latestBuildID: 20141011015303
    browser.startup.homepage: http://dvd.netflix.com/Queue?lnkctr=mhbque&qtype=DD
    browser.startup.homepage_override.buildID: 20141011015303
    browser.startup.homepage_override.mstone: 33.0
    extensions.lastAppVersion: 33.0
    gfx.blacklist.direct2d: 3
    gfx.blacklist.layers.direct3d9: 3
    media.gmp-gmpopenh264.lastUpdate: 1414115832
    media.gmp-gmpopenh264.version: 1.1
    media.gmp-manager.lastCheck: 1414115827
    network.cookie.prefsMigrated: true
    places.database.lastMaintenance: 1414111485
    places.history.expiration.transient_current_max_pages: 104858
    plugin.disable_full_page_plugin_for_types: application/pdf
    plugin.importedState: true
    privacy.donottrackheader.enabled: true
    privacy.sanitize.migrateFx3Prefs: true
    storage.vacuum.last.index: 0
    storage.vacuum.last.places.sqlite: 1414111483
    Important Locked Preferences
    JavaScript
    Incremental GC: true
    Accessibility
    Activated: false
    Prevent Accessibility: 0
    Library Versions
    NSPR
    Expected minimum version: 4.10.7
    Version in use: 4.10.7
    NSS
    Expected minimum version: 3.17.1 Basic ECC
    Version in use: 3.17.1 Basic ECC
    NSSSMIME
    Expected minimum version: 3.17.1 Basic ECC
    Version in use: 3.17.1 Basic ECC
    NSSSSL
    Expected minimum version: 3.17.1 Basic ECC
    Version in use: 3.17.1 Basic ECC
    NSSUTIL
    Expected minimum version: 3.17.1
    Version in use: 3.17.1
    Experimental Features
    Above is the results of your troubleshooting request. The extension I want to remove is called Cinema ploos 0.95.5 I currently have it disabled, but want to get rid of it altogether. One note I am on an I-mac.

  • Nokia 5230 - remove ADD contact button on main pag...

    I have searched the forum, the book and the web to find a way to remove the ADD contact button that appears on the main screen, but so far I have not found a way to do it, can someone please point me in the right direction, thanks.
    Solved!
    Go to Solution.

    "Actually you can add contact via the contact menu, which is at the bottom of my screen and then pressing on the 3rd option that allows a new contact."
    thanks for the information.
    "It's pretty ugly there, it block out anything that I put as wallpaper."
    You can remove whole contacts bar but can't remove "add" button only.
    Previous Phones: 6600, 7610, 6230, 6230i, 1100, 1112, N70, N73, N95, N95 8GB, 5800XM, 5230, C5, iPhone 3GS, SE Xperia X10, N900, N8, SE Xperia Arc
    Current Phones: Nokia N9, iPhone 4

  • Adobe Reader XI, how do I remove the panel on the far right for Tools, Fill & Sign, Comment?

    How do I remove this panel on the far right of the screen?  It takes up too much space when I move the Adobe window to only the left or right side of my screen.  Can it be shrunk like Bookmarks, Attachments and Thumbnails?

    Thanks ~graffiti.  That got me halfway there.  I only want the tool bars on the right to go away.  I like the toolbars on the top.
    I found if I "Hide Toolbars" and then "Show Toolbars", the Tools Fill & Sign Comment toolbar comes back minimized.  The shortcut key is F8.  I will have to remember the shortcut so I may rapidly turn off and then show the toolbars.

  • How to remove back panel., want to  replace harddirve, how to remove back panel., want to  replace harddirve, how to remove back panel., want to  replace harddirve

    how to remove back panel., want to  replace harddirve, how to remove back panel., want to  replace harddirve, how to remove back panel., want to  replace harddirve
    lr45149

    select your iMac from here: http://www.ifixit.com/Browse/iMac_Intel and click on "hard drive replacement" for step by step instruction.

  • PE 5.0 Batch Processing for dust removal add on

    I have PE Elements 5 and have scanned about 6000 slides (whew!) into my system. I have been using a dust removal add in provided by the scanner manufacturer (Konica Minolta DiMage Scan Dual IV) which has a slightly better capability than the caned one provided by Adobe. I would like to be able to batch process the slides for dust removal. Is this possible?

    1. Is above possible at all?
    Simple answer, No.
    2. Does anyone know how to perform either of the 'Remove an Add-On' and/or 'Downgrade an Add-On'?
    As far as I know is not possible... you'll have to restore from backup.
    Regards
    Juan

Maybe you are looking for

  • Smartform print out problem : urgent

    Hi, I have developed a smartform to take the printout of the Sales Order created in VA01. I am facing a problem while taking the printout only if the line item in the sales order are more than 25. I the line items are less than 25 then I am able to s

  • Changing Network Location

    I want to create an AppleScript that changes my network location based on the network name detected by Airport. Currently I have to open: System > Network > Location And select the Location I'm at (ie. Work or Home). I'm trying to automate this chang

  • Defaulting rules for subinventory locators

    hi folks, i have researched a little bit, but am unable to figure out if oracle r12 has this capability inherent. before i move on to a forms-personalization / custom.pll based solution, i would like your expert opinion. i am in need of providing the

  • ICloud stopped working on iMail

    All of a sudden icloud isn't syning in iMail on my Mac - it says The server returned an error: Mail was unable to connect to the server "p08-imap.mail.me.com" using SSL on port 993. Verify that this server supports SSL and that your account settings

  • How can i connect mobile internet (USB devices)??

    Is there anyone who knows how can I can connect a mobile internet device connected through a USB port to my IPad-2?