Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Applet Pop-up menu working in JDK 1.3 is not working in JDK 1.6.0_15

843807Nov 14 2009 — edited Nov 14 2009
I am a new Java developer and have been tasked to support an existing applet program that was working in JDK 1.3 since it was developed a few years ago. When the users environment was upgraded to IE7 with JDK 1.6.0_15 The applet popup menus ceased to work. The popup menus are shown when a checkbox is selected. Now when a checkbox is selected, the checkbox shows checked but no popup menus show. The following is error output to the Java Console when a checkbox is selected to view the corresponding popup menu selections:

Exception in thread "AWT-EventQueue-2" java.lang.IllegalArgumentException: origin not in parent's hierarchy
at java.awt.PopupMenu.show(Unknown Source)
at VasQuery.QryByVol.chkBoxVol2_itemStateChanged(QryByVol.java:1533)
at VasQuery.QryByVol$23.itemStateChanged(QryByVol.java:793)
at java.awt.Checkbox.processItemEvent(Unknown Source)
at java.awt.Checkbox.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread "AWT-EventQueue-2" java.lang.IllegalArgumentException: origin not in parent's hierarchy
at java.awt.PopupMenu.show(Unknown Source)
at VasQuery.QryByVol.chkBoxVol5_itemStateChanged(QryByVol.java:1649)
at VasQuery.QryByVol$26.itemStateChanged(QryByVol.java:811)
at java.awt.Checkbox.processItemEvent(Unknown Source)
at java.awt.Checkbox.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)


I've included sample code.

Thanks in advance for any assistance.

Below is code sample for the selection of a checkbox that pops up a popup menu of selection values for the checkbox that corresponds to the label "Entire Plane". Code is similar for other checkboxes.These come from the class that defines the applet these actions take place in.
PopupMenu pop = new PopupMenu();
CheckboxGroup volumes = new CheckboxGroup();
Checkbox chkBoxVol1 = new Checkbox("Entire Plane",volumes,false); 
Checkbox chkBoxVol2 = new Checkbox("Forward Fuselage",volumes,false);
Checkbox chkBoxVol3 = new Checkbox("Center Fuselage",volumes,false);
Checkbox chkBoxVol4 = new Checkbox("Wing",volumes,false);
Checkbox chkBoxVol5 = new Checkbox("Mate",volumes,false);
Checkbox chkBoxVol6 = new Checkbox("Aft Fuselage",volumes,false);
Checkbox chkBoxVol7 = new Checkbox("Empennage",volumes,false); 
Checkbox chkBoxVol8 = new Checkbox("Miscellaneous",volumes,false);
Checkbox chkBoxVol9 = new Checkbox("None",volumes,false);

.
. 

// Add Pop-Up menu object to each checkbox that has multiple volume zones to be displayed in a pop-up
chkBoxVol1.add(pop);
chkBoxVol2.add(pop);
chkBoxVol3.add(pop);
chkBoxVol4.add(pop);
chkBoxVol5.add(pop);
chkBoxVol6.add(pop);
chkBoxVol7.add(pop);
chkBoxVol8.add(pop);
.

/**************************************************************************/
/ chkBoxVol1_itemStateChanged /
/ Processes predefined volume checkbox list selection for /
/ "Entire Plane". /
/**************************************************************************/

void chkBoxVol1_itemStateChanged(ItemEvent e)
{
if (chkBoxVol1.getState())
{
MenuItem volName;
ItemHandler handler = new ItemHandler(); 
PredefinedVolume volume = new PredefinedVolume();

int len = volumeVect.size();

pop.removeAll(); 

if (chkBoxVol9.isEnabled())
{
chkBoxVol9.setEnabled(false);
}

for (int i=0; i<len; i++)
{
volume = (PredefinedVolume)volumeVect.elementAt(i);
String name = volume.getName();
if (name.equals("ENTIRE PLANE") || name.startsWith("PLANE"))
{
volName = new MenuItem(name);
pop.add(volName);
volName.addActionListener(handler);
} 
}
pop.show(chkBoxVol1,0,0);
} 
}...........
.
.
.
.
/**************************************************************************/
/ Inner Class ItemHandler /
/ Handles Pop-up menu item selections /
/**************************************************************************/
private class ItemHandler implements ActionListener
{
public void actionPerformed (ActionEvent e)
{
PredefinedVolume volume = new PredefinedVolume();

int len = volumeVect.size();

//Determine which menu item (or Volume) was selected
for (int i=len-1; i>=0; i--)
{
volume = (PredefinedVolume)volumeVect.elementAt(i);

if (volume.getName().equals(e.getActionCommand()))
break;
}

specVol = new SpecifiedVolume(volume);

// update image and volume limit text
updateZ = true;
repaint(); 
}
}

Comments

user11440683
Answer

Hi,

I recently experimenting with this on PBCS.

Others experience my be different - please chip in if you have -  but I noticed virtually no performance difference when comparing with a baseline aggregation that originally had intelligent calc off, with a aggregation that was taking ~2 minutes to run.

This was when experimenting against 3 different scenarios; -

1. Previously processed, so you would expect the dirty only process to have most effect

2. Only a single combination of data dirty, so again you would expect a considerable improvement processing dirty only

3. After a very large scale change when you would expect minimal difference between the two aggregations

My only problem is with PBCS tuning benchmarks is sometimes my aggregations are massively variable with no user load on the system (up to a factor of 3 times longer) which I am guessing is down to share of physical server cpu on the Oracle Cloud server farm...

Marked as Answer by Teresa Modesta · Sep 27 2020
Teresa Modesta

Mmmm - not a glowing endorsement, anyone else have a genuinely good result using the settings I describe to use intelligent calculation in a less than full cube aggregation?

I also have massively variable aggregation times with the same script and no database load to explain it...

Teresa Modesta

In the end I followed your lead and ran a few tests, and sadly reached the same conclusion.

Couldn't find anything in the log files that made it obvious that intelligent calc was not processing clean data, so would be interested if anyone can confirm that, but for now closing this question as no other useful input is incoming and from my own tests it does not seem to help.

Thanks sweetie!

Teresa X.

1 - 3
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Dec 12 2009
Added on Nov 14 2009
1 comment
174 views