Canvas overlapping

Is it possible to do canvas overlapping? Eg, draw a smaller canvas onto a larger one that contains only a backgroundimage.
And if not, what would be my alternatives?
Thx in advance.

Nevermind,
add(<component> , <z-index>) does the trick.

Similar Messages

  • Multiple canvas overlapping other canvas

    I have 3 canvases in one form. The first one will appear at the top and the other 2 will appear at the bottom. I have created a radio button in the first canvas to allow the user to have to option to choose. If the first option is choosed, the 2nd canvas will appear at the bottom of the screen(3rd canvas will be hidden) and if the 2nd option is selected, the 3rd canvas will appear same position as 2nd canvas and the 2nd canvas will be hidden.
    The "VIEWPORT_Y_POS" and ""VIEWPORT_Y_POS_ON_CANVAS" for the 1st canvas is set to ZERO while the 2nd and 3rd is set to 200.
    The "HEIGHT" property for the 1st canvas is 155 and the other 2 canvases is 480.
    During the POST_NEW_FORM and after the user selected the second option, the 1st canvas and 3rd canvas display nicely(the 2nd canvas hidden). But after the data being displayed and some of the fields in the 3rd canvas has been enabled, the 3rd canvas being overlapped by the first canvas at the top portion.
    I have double checked the coding and there is no run-time setting the canvas viewport Y position property. What was wrong with the setting? This program has been running in our production server(Application Server 9.0.2) quite some time without any problem. But, when copied to our development server(application server 9.0.4), it gave me this kind of problem.
    Is this a bug for the newer version of application server? or it's the setting problem to the canvas?

    I have tried to set the viewport of the canvas programatically during run-time, but seems like the same problem happened.
    I tried to set the viewport Y position on canvas to Zero instead of 200 and then the viewport Y position to 200 at design-time. My problem solved!
    But the question is why the 2nd canvas didn't give me this kind of problem even I have set the viewport Y position on canvas same as the 3rd canvas(the canvas will appear same position as the 3rd canvas) wherelse the 3rd canvas did?
    Another question is why when I run this form on the Apps Server 9.0.2 no problem but Apps Server 9.0.4 did?
    Thanks.
    Cheong

  • Paint Canvas overlaping

    I'm having some problems with my GUI.
    I'm using a boarderlayout. I have a panel in the NORTH with my JMenu. Another panel with some JButtons in the CENTER. and Finally, a panel containing a CANVAS in the SOUTH.
    The problem I'm having is when i click on my menu the JMenuItems seem to get cut off when it reaches the the CANVAS panel, but it can get through the panel with the JButtons.
    Any thoughts?
    I can provide the code if needed.

    I had the same problem which I solved by using JPanel as the previous poster suggested. Then someone advised me that it would be better to use JComponent, which turned out to be a better idea. It eliminated a problem with backgrounds and is probably (minimally) faster because it doesn't have the overhead that a JPanel brings for laying out components.
    As to what he meant by the paint ... the same thing I would presume you're doing with Canvas. How are you drawing on the Canvas? The normal way is to override the paint() method to draw what you want to draw. Do the same thing with a JComponent. If you're drawing on it from some other function ... well, that's generally not a good idea, because if another window covers your window and is then removed, or if you minimize and then restore, it won't know how to repaint itself. But in any case, any function that will draw on a Canvas should be able to draw on a JComponent.

  • Canvas covering scrollbars in JScrollPane

    I have an image with listeners, implemented as a Canvas. I add it to a JScrollPane. When This JScrollPane is displayed, I get the Canvas overlapping the scrollbars, but still responding to MouseWheel events. Is seems that it is being painted on top of the JScrollPane instead of behind it. Is there a way to remedy this?
    Thanks in advance.
    -Nate

    nevermind
    I got it taken care of.. Stupid question.

  • How to change the position of a rectangle dynamically

    Hi,
    I am designing a form, where the position of a rectangle has to be changed dynamically. I'm trying with Set_Item_Property(Position property). But I'm unable to change the position. I need some information regarding this graphics object. Normally, we attach block name with the items. Then for these graphics object, what will be attached. I'm using Forms 6i version.
    Regards,
    Alok Dubey

    you can use a stacked canvas with the rectangle in it. Then you can change the position of the canvas at runtime. Problem is, that the canvas overlaps objects...

  • Awt lightweight/heavyweight components

    I have an applet which has a canvas added to it. On this canvas I draw all my images/ app output. I've created my own lightweight component (popup) which shows a popup on the screen and listens for mousevents.
    The problem that I have is that when I add the canvas to the applet, I cannot receive any events in my custom components (when I add them to the applet container without the canvas it works just fine). I believe that this is because when a heavycomponent (canvas) overlaps a lightweight component (my popup) it will "steal" all events from being delivered to the lightweight comp.
    Is there any way around this? (I can't use swing because I have to stick to awt1.1 :( )
    I also have to use the canvas (for use with bufferstrategy if available on the user's jvm)
    Thanks in advance!

    Thanks for the solutions, unfortunaly the window solution is no option for me, so I tried to make the popups extend a canvas, but it still doesn't catch any events.
    Below is the source code that shows exactly what im doing, maybe anyone can tell me what im doing wrong?
    [MAIN APPLET]
    import java.applet.*;
    import java.awt.*;
    import java.net.URL;
    public class Applet1 extends Applet implements PopupEventListener, Runnable
         private static final int width = 500;
         private static final int height = 500;
         private PopupManager popupManager;
         private Thread thisThread;
         private Image buffer, testImg;
         private Canvas drawArea;
         private Graphics drawGfx;
         public void init()
              setBackground(Color.black);
              //create a drawing area for the app
              drawArea = new Canvas();
              add(drawArea);
              //initialize a popupmanager which handles/paints all popups
              popupManager = new PopupManager(this, this);
              //load an test image for our popup
              MediaTracker t = new MediaTracker(this);
              testImg = getImage(getCodeBase(), "test1.gif");
              t.addImage(testImg, 0);
              try { t.waitForAll(); }
              catch (InterruptedException e) { }
         public void start()
              //add a popup
              popupManager.addPopup(testImg);
              //get the graphics context for our application
              drawArea.setVisible(true);
              buffer = drawArea.createImage(width, height);
              drawGfx = buffer.getGraphics();
              thisThread = new Thread(this);
              thisThread.start();
         public void update(Graphics g)
              paint(g);
         public void paint(Graphics g)
              drawGfx.setColor(Color.white);
              drawGfx.fillRect(100, 100, 300, 300);
              g.drawImage(buffer,0,0,this);
              //draw the popup(s)
              popupManager.paint(g);
         public void run()
              while (thisThread == Thread.currentThread())
                   repaint();
                   try { thisThread.sleep(30); }
                   catch (Exception e) { }
         public void stop()
         public void destroy()
         // implemented to listnen for popups events
         public void processPopupEvent(int code)
              switch (code)
                   case Popup.EVENT_CLICKED:
                        System.out.println("clicked on popup!");
    [POPUPMANAGER, manages all the popups in the applet]
    import java.awt.Image;
    import java.awt.Container;
    import java.awt.Graphics;
    public class PopupManager
         public final static int MAX_POPUPS = 3;
         private Popup[] popups = new Popup[MAX_POPUPS];
         private Container parent;
         private PopupEventListener pc;
         public PopupManager(Container parent, PopupEventListener pc)
              this.parent = parent;
              this.pc = pc;
         public Popup addPopup(Image img)
              try
                   int i = -1;
                   for (i = 0; i < popups.length; i++)
                        if (popups[i] == null) break;
                   if (i == MAX_POPUPS)
                        return null;
                   popups[i] = new Popup(img, parent, pc, i);
                   parent.add(popups);
                   return popups[i];
              catch (Exception e) { }
              return null;
         public final void removePopup(int nr)
              if (nr > MAX_POPUPS) return;
              popups[nr] = null;
         //paints all active popups
         public void paint(Graphics g)
              try
                   if (popups != null)
                        for (int i = 0; i < popups.length; i++)
                             if (popups[i] != null)
                                  if (popups[i].isActive()) popups[i].paint(g);
              catch (Exception e) { }
    [POPUP CLASS (CUSTOM COMPONENT)]
    import java.awt.Canvas;
    import java.awt.Component;
    import java.awt.Container;
    import java.awt.Event;
    import java.awt.AWTEvent;
    import java.awt.event.KeyEvent;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseListener;
    import java.awt.Image;
    import java.awt.Dimension;
    import java.awt.Graphics;
    public class Popup extends Canvas
         public static final int EVENT_CLICKED = 0;
         private int index, width, height, xPos, yPos;
         private Image image;
         private boolean active;
         private Dimension size;
         private Container parent;
         private PopupEventListener pc;
         public Popup(Image im, Container p, PopupEventListener pc, int index) throws Exception
              image = im;
              parent = p;
              this.pc = pc;
              this.index = index;
              active = true;
              width = image.getWidth(null);
              height = image.getHeight(null);
              xPos = (int)((parent.getPreferredSize()).width/2)-(width/2);
              yPos = (int)((parent.getPreferredSize()).height/2)-(height/2);
              if (xPos < 0) xPos = 0;
              if (yPos < 0) yPos = 0;
              size = new Dimension(width, height);
              setBounds(xPos, yPos, width, height);
              enableEvents(AWTEvent.MOUSE_EVENT_MASK);
         public void paint(Graphics g)
              g.drawImage(image,xPos,yPos,parent);
         public Dimension getPreferredSize()
              return size;
         public Dimension getMinimumSize()
              return size;
         public Dimension getSize()
              return size;
         public int getIndex()
              return index;
         public boolean isActive()
              return active;
         public void processEvent(AWTEvent e)
              System.out.println("popup event...");
              if (e.getID() == MouseEvent.MOUSE_CLICKED)
                   pc.processPopupEvent(EVENT_CLICKED);
              super.processEvent(e);
    [PopupEventListener]
    public interface PopupEventListener
         public abstract void processPopupEvent(int evt);

  • Multiple canvases overlapping other canvas

    I have 3 canvases in one form. The first one will appear at the top and the other 2 will appear at the bottom. I have created a radio button in the first canvas to allow the user to have to option to choose. If the first option is choosed, the 2nd canvas will appear at the bottom of the screen(3rd canvas will be hidden) and if the 2nd option is selected, the 3rd canvas will appear same position as 2nd canvas and the 2nd canvas will be hidden.
    The "VIEWPORT_Y_POS" and ""VIEWPORT_Y_POS_ON_CANVAS" for the 1st canvas is set to ZERO while the 2nd and 3rd is set to 200.
    The "HEIGHT" property for the 1st canvas is 155 and the other 2 canvases is 480.
    During the POST_NEW_FORM and after the user selected the second option, the 1st canvas and 3rd canvas display nicely(the 2nd canvas hidden). But after the data being displayed and some of the fields in the 3rd canvas has been enabled, the 3rd canvas being overlapped by the first canvas at the top portion.
    I have double checked the coding and there is no run-time setting the canvas viewport Y position property. What was wrong with the setting? This program has been running in our production server(Application Server 9.0.2) quite some time without any problem. But, when copied to our development server(application server 9.0.4), it gave me this kind of problem.
    Is this a bug for the newer version of application server? or it's the setting problem to the canvas?

    I have tried to set the viewport of the canvas programatically during run-time, but seems like the same problem happened.
    I tried to set the viewport Y position on canvas to Zero instead of 200 and then the viewport Y position to 200 at design-time. My problem solved!
    But the question is why the 2nd canvas didn't give me this kind of problem even I have set the viewport Y position on canvas same as the 3rd canvas(the canvas will appear same position as the 3rd canvas) wherelse the 3rd canvas did?
    Another question is why when I run this form on the Apps Server 9.0.2 no problem but Apps Server 9.0.4 did?
    Thanks.
    Cheong

  • Items overlapping in Stacked canvas

    Hi,
    I have added 3 columns in a stacked canvas which is in a tabbed canvas. but the new items i have added are overlapping on the existing columns. Not able to adjust the alignment properly. Please help me resolve this issue.
    Thanks & regards,
    Pavan kumar

    the sequence of the item depends on your navigation. NEXT_ITEM or PREVIOUS_ITEM navigates to the item depending on the sequence order.
    regarding your problem: did you open the canvas in the layout editor? here you will find what items do not fit on the canvas.

  • Multi-row blocks overlap on same canvas

    Hi,
    I have a problem designing a Form. We use Designer 6i and we generate with the Headstart 6.5 (first version) scripts.
    I want to make a master-detail form and both of those blocks have to be on 1 tabpage. Both blocks also are multi-row block. Every time i generate it the two blocks overlap eachother in the canvas. I tried it with item groups for both blocks. I used the X and Y position in the properties of the block (module components) but they keep on overlapsing (Because it looks like both blocks start from the same starting point, so that makes them overlap). Is this a know bug or did anyone ever had the same problem?
    Oh yeah, and on both blocks i did put the preference set from Headstart (QMS65_MULTI_RECORD_BLOCK).
    Please help.
    Kind regards,
    Dave

    Hi,
    Set the "placement property" of the master block component to "new tab canvas page" and the detail component to "Same tab canvas page". You can set the size of the first master block for example: X = 102 and Y = 61
    You dont need to set the size of the detail block.
    Hope this helps you,
    CB

  • Canvas on the Internal Frame overlap the Menus.!!!

    hi friends
    i have added canvas on the internal frame(contentpane).
    when internal frame appears on the screen menus are being overlapped.
    it means if i open the menu they will be hide behind canvas and can not be seen.
    plzz guide me what to do?

    This is a typical problem when mixing Swing (JFrame) components with AWT components (Canvas). Make sure you stick to only one of these GUI packages when implementing your own gui.
    Have a look at the java tutorial.
    http://java.sun.com/docs/books/tutorial/uiswing/painting/overview.html
    Manuel Amago.

  • JPopupmenu can't overlap Canvas

    Hello,
    I have an application which displays a Canvas object I've created. The problem occurs when I activate a popupmenu; a part of it isn't displayed because it overlaps my Canvas.
    How could I fix this ?
    I have no problem when my popupmenu overlaps a jtable.
    Thanks.

    I found a solution, I don't know if it's the best one.
    To put it clear, I have a variable : graph which is an instance of my Graph class (extends JComponent).
    First I tried to add directly my graph object into a JTabbedPane, and I tried to: graph.setBackground(Color.white)
    nothing changed.
    I even tried to do : graph.setOpaque(true) before, but it didn't work (I read this in a former post).
    So I've added my graph object into a JPanel, and then added the JPanel into my JTabbedPane.
    I did : myPanel.setBackground(Color.white)
    it works.
    If anyone has a better solution...
    Thanks for the answers.

  • Stacked canvas is overlapping the content canvas

    Hi all,
    I am writing a program where I have one content canvas and a button to display the stacked canvas on button click. But when I run the form, 'only' the stacked canvas is showing-up even though I have hidden the stacked canvas in the on-new-form trigger.
    Can anybody please shed some light.
    Thanks,
    Naren.

    Hi,
    Assuming you have two or more datablocks:
    On the object navigator, move up (drag-drop) the datablock shown on the main canvas, so it apeears first.
    OR
    Open the Forms properties and set property: "First navigation data block"
    Regards,
    Hugo.

  • Overlapping of splash screen and canvas

    hi
    I am new user to net beans mobility pack.I have to display canvas only after splash screen but while i am running program it is giving me both.(splash screen and canvas) and if i am using form instead of canvas it works properly..why is it so?
    can anybody suggest me .

    I want to add as much info as I can:
    *Splash screen shows up, but only the video/image viewer/manager hub or whatever is able to open.
    *I can open up the Premiere Elements program to the intro loading screen, once it loads the plugins it closes.
    *I've tried every possible combination within the video manager hub thing to access the Video editing (Elements) software, it may show the loading screen then it closes with nothing, (the video manager remains open still).
    Installed: Adobe Premiere Elements 8.0 from DVD 1, I did not install templates from Disc 2 or whatever.
    *"Single Processor Detected" (I think that's what it said)
    *I set up Service Pack 2, because it wouldn't let me install until I did this.
    *I have Windows XP Professional
    *I have plenty of HardDrive space. Don't think RAM is a problem.
    What I'm going to do tonight:
    *Install latest Quicktime 7.something, (downloaded on 11-01-09) from Quicktime.com
    *Uninstall the unnessesary driver file mentioned in another post. (or disable it by renaming it)
    *Hold shift key while opening program to clear cache, I read that somewhere.
    *Possibly re-install software, hopefully I could get back in with my Serial.
    -I printed out Trouble shooting section from Adobe.com.
    Please leave suggestions, I'm sure I'm not the only one who will benefit.
    Robb
    (I got my receipt, I really don't want to use it)

  • Problem with Stacked Canvas

    Hi,
    I have prepared a stacked canvas on a content canvas.
    Both content and stacked canvas are based on the same data block. In the data block 2 items are on content canvas and the remaining are on stacked canvas. I have also a scroll bar on the content canvas so that we can scroll to the right as there are many items on it.
    so 1st and 2nd fields are on the content canvas and remaining ones are on stacked canvas.when i tab out of the 1st field stacked canvas goes invisible, but when i tab out of the 2nd field stacked canvas again comes back.
    How can i avoid this?
    I want the stacked canvas always to be displayed when i tab out from any where.
    One more problem is, when i click on the 2nd field the stacked canvas goes invisible too
    Your suggestions are greatly appreciated.
    Thanks
    Sandeep

    Check if the second item overlaps the area of the stacked canvas. Forms always makes the current item be displayed fully and therefore hides all areas which would overlap the item.

  • Hi stacked canvas blinking...

    Hi
    I am using oracle form 6i
    Actually i have two canvases
    1.content
    2.stack canvas
    In contend canvas i have a button when button pressed trigger
    show_view('canvas_transaction');
    when i pressed the button
    its blinging and not visible for long time...
    Thank u...

    u3 wrote:
    I appreciate the overlap issue and mentioned it in my first response, and I expect that changing the size or positon of the item or canvas is the most appropriate solution. Without knowing the full requirements I left an incomplete response, thinking that a dialogue would get the problem fixed. I don't think it's right to suggest navigating to the canvas as the only solution, omitting other possible solutions. My first response could have been better though.
    I never suggested that navigation to the canvas is The Only Solution I have always said and in many posts that: "+Beauty of Oracle is that you can reach the same result in 100s and 1000s of ways+" You can have 100s solutions for the same problem.
    No one is omitting any other solutions, You mentioned the overlapping issue in your first post asking the OP if that was the case, I merely explained to the OP why that happens, assuming if the OP knew about the overlapping issue, he/she would have solved the problem, and my second post was in response on your comments.
    It is not a must to navigate to an item that resides on the stacked canvas, but it's a good way to solve the overlapping issue in this case.
    Tony
    Edited by: Tony Garabedian on Sep 8, 2008 3:02 PM

Maybe you are looking for

  • IN_WRONG_TABLESPACE

    We just upgrade out BW system 3.1 Content and upgraded to BI7.0.  Now I am getting the messages: BR0970W Database administration alert - level: WARNING, type: IN_WRONG_TABLESPACE, object: (index) SAPR3.CO2MAPINF~0, value: PSAPEL700D BR0970W Database

  • How to format a link to open in Chrome instead of IE?

    Is it possible to force a link within a SharePoint site to open in a certain browser? We have an online system that works best in Chrome. I've placed a link to this system in a library on our site - however, it will open in IE if that happens to be y

  • Showing negative numbers as 0

    Box 1: User Input Box 2: User Input Box 3: User Input Box 4: User Input Box 5: (Box 1 - Box 2) Box 6: (Box 3 + Box 4) Box 7: (Box 5 - Box 6) So I'm using the following equation for Boxes 5, 6 & 7: var v1 = getField("Box #").valueAsString; var v2 = ge

  • Tuning OBIEE query with DB index, but it's getting slower

    Hello guys I just have a quick question about tuning the performance of sql query using bitmap indexes.. Currently, there are 2 tables, date and fact. Fact table has about 1 billion row and date dim has about 1 million. These 2 tables are joined by 2

  • Suggestions for a Mac Pro 8-core Studio set up

    After much research, clutter of information and opinions i find myself asking for suggestions. Im trying to run Logic Pro 8 on a macpro 8-core with Broadway Big Band, EastWest, Play, Kontakt3 and some other plug ins running simultaneously. My questio