Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Strange menubar graphic artifact in frames created by applets

Reply
Thread Tools

Strange menubar graphic artifact in frames created by applets

 
 
Felix Dejavu
Guest
Posts: n/a
 
      11-21-2003
When I create a frame from an applet and add a menubar, a strange thing
happens. When the frame is enlarged, the menubar will be drawn correctly
over the preexisting area, but the newly created/exposed area of the
menubar will remain undrawn and will usually contain whatever was there
before the window was widened (other windows, etc.). When I open the same
frame when I'm not an applet, the menubar is fine. I'm using Win98 with
the latest JRE. It occurs both in explorer and in appletviewer. Is this a
known problem or am I smoking the crack?

-fd

import java.applet.*;
import java.awt.*;
import java.awt.event.*;

class MenuFrame extends Frame {
public MenuFrame() {
Menu m = new Menu("File");
m.add("Exit");
MenuBar mb = new MenuBar();
mb.add(m);
setMenuBar(mb);
addWindowListener(new WindowHandler());
setSize(200, 100);
setVisible(true);
}
class WindowHandler extends WindowAdapter {
public void windowClosing(WindowEvent ev) {
dispose();
}
}
}

public class MenuProblem extends Applet {
public void start() {
new MenuFrame();
}
static public void main(String[] args) {
new MenuProblem().start();
}
}
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it possible to mouseover a GRAPHIC . . . that launches another (freestanding) GRAPHIC (ie. when flash is _not_ available)? 50 SOMETHING GAL HTML 3 12-10-2006 01:10 AM
Artifact free scrolling Roedy Green Java 0 07-13-2005 08:13 PM
Maven - Error retrieving artifact from external repository Jerry Henderson Java 0 09-01-2004 04:31 PM
Re: Do you what this graphical artifact is called? Juan Pérez Computer Support 0 05-07-2004 09:41 PM
newbie q - MenuBar inside client-side applets? Dev_Prog Java 3 03-06-2004 01:10 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57