A canvas

hi all, i want to make a paint program that has a canvas which has more canvas's stacked on top of it. Does anyone no of a way of implementing this?

you may use the CardLayout.. but each canvas will have it own set of graphic shapes...
you may also use a set of BufferedImages.. and overwrite the paint method of onw canvas to combine it in the final image....

Similar Messages

  • Display image in full screen canvas

    Hi frndz
    I have an Image, which either bigger in size of a canvas or small
    I want to give an option of a full screen view
    So its a kind of zoomIn/ zoomOut function in one method
    how can I convert such small/big images into full screen canvas size
    thanks
    alpesh

    This question has been asked already several times here: http://onesearch.sun.com/search/onesearch/index.jsp?qt=resizing+image&subCat=siteforumid%3Ajava76&site=dev&dftab=siteforumid%3Ajava76&chooseCat=javaall&col=developer-forums
    There is no method in MIDP which rescales a picture for you, so you have to write it on your on (or use existing code). But usually this would be pretty slow. Mostly it is better to offer different versions of your application for different devices (screen resolutions) where the images have already the appropriate size within your jar-file.

  • Can I draw *.bmp, *.png in java.awt.canvas ?

    In paint method of my program, I get image from Toolkit like this:
    public class CanCanvas extends Canvas{
    //In loadImage method
    Toolkit.getDefaultToolkit().getImage(
                        getClass().getClassLoader().getResource(
                                  resource.getString("bg.jpg")));
    //.... In paint method
    if (image != null && image.size() > 0) {
                   for (int j = 0; j < image.size(); j++) {
                        Image image1 = (Image) image.elementAt(j);
                        Rectangle rectangle = (Rectangle) imgLocation.elementAt(j);
                        g.drawImage(image1, rectangle.x, offset + rectangle.y,
                                  rectangle.width, rectangle.height, null);
                        i = i <= rectangle.y + rectangle.height + 7 ? rectangle.y
                                  + rectangle.height + 7 : i;But there is something very strange, if my image is *.jpg or *.gif, it runs ok, otherwise -*.bmp, *.png-, it can't draw the image.
    Would anyone tell me why ? Is the reason java.awt.canvas ?
    Thanks in advance ^ ^

    If you'd bother to read the documentation of the methods you're using, you'd know:
    http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Toolkit.html#getImage(java.lang.String)
    Returns an image which gets pixel data from the specified file, whose format can be either GIF, JPEG or PNG.

  • Runtime tab canvas does not look the same as designed in layout editor.

    I created a tab canvas with the following physical properties:
    Corner Style - Chamfered
    Width Style - Variable
    Active Style - Bold
    The canvas looks nice in the layout editor, with the above properties. However, at runtime, the tab canvas seems to ignore the above properties and instead shows up with non-chamfered looking (whatever chamfered means) fixed-width rectangular tabs and the active tab page label is not in bold font. Is there a runtime setting that I'm missing here?
    null

    I am experiencing the exact same thing. The width of the tabs in the layout editor is varied depending on the length of the text. However, at run-time, the width of the tabs is fixed, causing the tabs to be wider than the window and a set of VCR buttons to appear in the upper right corner of the canvas. Personally, I think this is a Forms bug. Why would they intentionally let us set the width to variable at design-time only to force a fixed width at run-time?

  • Oracle Forms 10G(tabbed canvasses not working the same as in Forms 6i)

    Hi everyone,
    I have a form which gets called from another form through a list of value. The called form(second form) has a group of tabbed canvases which get displayed depending on the parameters passed from the first form.
    The Form is working prefectly fine in Forms 6i but when I converted the same form in to forms 10G it does not seem to work the same way. The tabbed canvasses are not getting displayed. I am manually having to press the execute query to get data displayed in the tabbed canvasses. I checked the parameters that are being passed and they are the same as that in Forms 6i.
    Please let me know where my 10G Form is going wrong. Appreciate your help, please send me an email on [email protected]
    Thanks

    duplicate
    Re: Oracle Forms 10G not working as Oracle Forms 6i

  • How can I use the print module to print different size images on one large "canvas"?

    How can I use the print module to print different size images on one large "canvas"? An example would be in Photoshop, go to file>new, and create the size paper I want, and move images of different sizes onto it.
    I was thinking the print module would do this automatically for me.

    You can't, at present. It's been a requested feature, so we'll see if it shows up in a future version, but it's not there at present.

  • Wacom tablet pressure sensitivity, dont work outside canvas

    Hi.
    I wonder, if i'm the only one, who are having problems to start a stroke outside the canvas and follow it on the canvas, without the pressure sensitivity is all on max.
    seems the same is happing, if you have marked an area and start at stroke outside that area. kinda like the brush only start recognize the pressure level when on the canvas or marking.
    does it make sense?
    running windows7 64bit intous3 A4.
    tested in on my my laptop too on the intous3 A5, same problem.
    /cheers
    Heino

    Hi JJMack
    thx for your comment
    - i'm on photoshop cs5, any brush thats pressure sensitivity, did it with both docked and floating canvas.
    I think i've fixed the issue.
    Apprently its a problem with the newest version of the wacom driver. And somehow it only affects photoshop.
    i've downloaded the march 2010 driver from wacom. And installed that. seems to be fixed.
    /cheers

  • Text put into a canvas element with context.fillText() always has a black box where each letter goes. If the text is black you just see the black rectangle. If the text is not black you see it on the black bounding box. Surely this is not right.

    This has happened on the last few versions of firefox, as long as canvas has been supported. I see other people's screen shots from canvas tutorials, and the text always looks normal. On my system, any text put into a canvas element via context.fillText() will have a black bounding box for each letter, sized appropriately for the letter. If the text is black, of course you only see rectangles. If the text is a contrasting color, then you can read it, but it looks bizarre.

    Thomas...same kind of crap here.
    I used Custom Text - entered a sentence, hit return, entered another.
    Set to 72 pt.
    The default alignment is centred - I want left aligned text...the text start point stays at the centre of frame and the sentence runs off the edge of the bounding box.
    There is no settings in the Text or Title inspector dialog to correct that!
    Using Transform will not sort it!

  • No video in Viewer/Canvas, only audio

    I use Final Cut Pro X since Day One and I survived bugs and endless beachballs on my 2011 17' Macbook Pro.
    A week ago FCPX stopped playing any video in viewer/canvas while scrubbing. Only audio is audible. Impossible previewing a single clip or playing the timeline. The beachball is immediate and the program hangs and need forced exit. This happens whatever the video source is: only audio plays. Same reinstalling from scratch 10.0.4. Trashing preferences and using quickfix from Digitalrebellion didin't help.
    A momentary solution has been creating a new administrator user and working from there, with many limitation and commodities I have "on the other side".
    I can't identify anything particular that might have caused this! Quicktime runs fine and so do Final Cut Pro 7, iMovie and all the video compartement.
    I searchead the web but nobody seems to have follen in this situation.

    Have the same problem. Did you ever find answer?

  • Help displaying an image using the canvas!!!!!!!!

    Hey guys
    I don't know whether I am not grasping some concepts well.I have been going mad trying to get the code working
    Here is the code
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    import java.io.*;
    * @author Administrator
    * @version
    public class MyMIDlet extends javax.microedition.midlet.MIDlet implements CommandListener{
    private Display display;
    private MyCanvas canvas;
    private Command exitcommand = new Command("Exit",Command.SCREEN,1);
    private Image source;
    public MyMIDlet() {
    protected void startApp() throws MIDletStateChangeException{
    if (display == null){
    initMIDlet();
    protected void pauseApp() {
    protected void destroyApp(boolean unconditional)throws MIDletStateChangeException {
    exitMIDlet();
    public void commandAction(Command c, Displayable d) {
    if (c == exitcommand){
    exitMIDlet();
    protected void initMIDlet() {
    display = Display.getDisplay(this);
    canvas = new MyCanvas(this);
    System.err.println("Canvas instiated succesfully");
    canvas.addCommand(exitcommand);
    canvas.setCommandListener(this);
    display.setCurrent(canvas);
    public void exitMIDlet() {
    notifyDestroyed();
    import javax.microedition.lcdui.*;
    import javax.microedition.midlet.*;
    import java.io.*;
    public class MyCanvas extends Canvas implements Runnable {
    private MIDlet midlet;
    private Image offscreen;
    private Image currentimage;
    private Graphics g;
    //MID profile application
    /** Creates a new instance of MyCanvas */
    public MyCanvas(MIDlet midlet) {
    this.midlet = midlet;
    try{
    currentimage = Image.createImage("/bird0.png");
    }catch(IOException e){
    System.err.println(e.getMessage());
    if (currentimage!= null){
    System.err.println("Image create successfully");
    }else{
    System.err.println("Image not created");
    try{
    Thread t = new Thread(this);
    t.start();
    }catch(Execption e){}
    protected void paint(Graphics g){
    Graphics saved = g;
    int x = getWidth();
    int y = getHeight();
    g.setColor(255,255,255);
    g.drawImage(currentimage,x,y,g.TOP|g.VCENTER);
    public void run() {
    repaint();
    I know for a fact that the Canvas class 's paint method is called by the system and not the application. This poses a problem for me because I am not sure how to pass the image to the piant method, so that it can be painted.
    When I run the program(using J2ME wtk04), this is the outcome.
    Image created succesfully
    Canvas instiatiated successfully
    null
    Here are my questions
    1) when is the paint method precisely called by the system?after a reference to the canvas class is created?
    2) is it wise to create the image when instiating the canvas class?( initially created the image using a separate thread)-when sould the image be created?
    3)how to let the application know when to use the image when painting the display area?
    I am just trying the logistics here. It is very crucial to me to understand the bolts of this as the core f my project fouses on the man machine interface development.(For the project, the cilent application is quering for the map using HTTP)
    I use a png file of size 161 bytes. Is that too big for testing purposes.
    I would all the help that I can get. thanks in advance

    1) when is the paint method precisely called by the system?after a reference to the canvas class is created?
    After the canvas is set as the current display, and after that, after the repaint() is called.
    2) is it wise to create the image when instiating the canvas class?( initially created the image using a separate thread)-when sould the image be created?
    It's better to create the image in the very begining of the program e.g. in the midlet initialization. You can call the created image as often as you like later on
    3)how to let the application know when to use the image when painting the display area?
    you have to tell it :))
    you can use if-then, switch, or anything else
    and you can use clipping too

  • The canvas is not showing up at all.

    I'm using CS6 and have everything running as usual. I make a new file, normal size of my art and everything, but the canvas (background) does not show up. So I think.. "Huh, that's odd."
    I also have navigator open since I use full screen. So as I draw strokes, I see them appearing in the navigator, but I cannot see the canvas. All I see is the colour of grey. Although the canvas is certainly there, since I can make visible strokes, it seems as if it were transparent, except I hadn't done anything with the image to start. Are there any solutions to this?
    Thanks!

    I can’t see my images and only get a black screen (or strange pattern).
    Mylenium

  • Can anyone tell me why a picture would change color when I try to download/upload it?  It is the exact same picture- chosen the same way and when it goes to any other program it changes the color (I've tried canvas on demand and mpixpro.  I've also tried

    Can anyone tell me why this picture changes color when I try to download/upload it?  It is the exact same picture I have taken from the same location.  The image on the left is via preview and the image on the right is what is shows like when I try to download it.  I have emailed it to myself and it shows fine on the computer and in CS4, but when I look at the download via my phone or on another computer it shows the wonky color on the right.  I have checked the color space shows RGB/8 bit.  Any ideas why or how to fix it?  It isn't with any one specific session.... and I've tried it on both my desktop and my laptop- saved image to an external hard drive and to drop box.  I've tried sending the image to canvas on demand, my email, mpxipro, POST editing- all the same result.  Please HELP!!  What am I doing wrong?

    Most of the time you see something like that. The image in question has a color profile other then sRGB. Some image viewers/displayers are color managed and others are not.  So the image do not look the same in all of the applications you use. So colors seem to change.
    Try converting it to sRGB color and see if then looks the same all around. Also I think PC and Mac displays are set to different gamma something like 1.8 and 2.2
    Though I'm colorblind I even see color variations.

  • I now get a blank (white) screen in the Viewer.  Can still drop video from the viewer into the canvas, but don't see it in the viewer.  Please help!

    It doesn't seem to matter what project I'm working on... the picture in the viewer is gone.  All I see is a blank (white) screen.  If I put the cursor over the viewer and drag to the timeline, the clip will appear on the time line (and in the canvas) but I don't see it in the viewer.  I usually edit my clips in the viewer and not on the canvas.  Can anyone explain why this might be happening and how I might fix.  I'm suspecting I must have messed up one of the settings but I'll be darned if I can figure out which one or how to fix.  Please help!

    David.  Thank you very much.   The problem was not with the canvas but rather the Viewer.  But the solution was the same.  Somehow, the Viewer window was re-set to Alpha.  I changed it back to RGB.... and the picture is back.   These issues are often very simple.... but they can drive you bats if you don't know the answer.   Very grateful.  Tim

  • Canvas Output to Broadcast via mini-DVI to Composite Video?

    Hello,
    I would like to send the output of my NTSC Canvas to my NTSC broadcast monitor via it's Composite input.
    I run FCP 6.0.3 on OS 10.5.3 and I was hoping I could make this connection via Apple's mini-DVI to Composite adapter. I seem to be all set on that monitor to NTSC, but all I end up displaying is the desktop's background.
    Can this be done?
    Thanks in advance for any help!
    Alain

    You need a firewire based DV/Analog converter.
    Check into the Canopus lineup.
    x

  • FCP 4: NTSC monitor image FROZEN/movie plays JITTERY in canvas window.

    Hey guys. This started yesterday. Every time I hit play, the image from the frame I began playing at on the timeline remains frozen on my NTSC monitor, while the movie plays jittery, roughly, totally unsmoothly in the canvas window. I'm pretty sure I've tried all of Shane's answers, but right now I'm stuck. Any help is immensely appreciated.
    PowerPC G4   Mac OS X (10.3.9)  

    Shane's stock answers addresses this, but make sure
    that under the View mene that you are set to "All
    Frames" and not "Single Frame"
    Yeah, I had that covered from the beginning, but this sucker is stuck on whatever frame I begin to play from.
    Powerbook G3 Pismo 500 Mac OS X (10.3.7)
    Powerbook G3 Pismo 500 Mac OS X (10.3.7)

  • Extracting an asset that has a portion off canvas

    I want to point out something that has happened to me just a few times, and I'm sure some people will have this issue and some won't since it's totally based on how one designed their psd's.
    When extracting something like this header here...
    I get this result...
    As you can see my designer just made a taller shape and moved it off canvas, something I wouldn't do but something my designer has done before, it's fine he doesn't think about that kind of thing a lot and I can just pull it into photoshop and cut the excess off, but I wanted to point this out and just put on the radar that this does happen sometimes and it would be awesome if parfait was smart enough to see the off canvas bit and cut it out of the asset extraction.

    Hi Jordan4jc,
    I think we've fixed this - would you please check and let us know? go to http://creative.adobe.com/files, and upload your PSD and click Extract. Please let us know.
    Bruce

Maybe you are looking for

  • Multiple profiles/users on the same device

    Hi there, I know that iOS is a single user environment. But, I am currently working in an enterprise environment and I was wondering if it was possible to have several profiles on the same device, maybe using certificates or so? Thanks for your help

  • Setup ports in Time Capsule

    hello folks, I replaced my old router (non TC) by a pretty new TC 3Tb. I have installed also in my home some cameras that transmites images real time throught out internet using DYNDNS. on my previous router I was obliged to setup some specific ports

  • ImageUltra Builder 5 - Can't get new computers to connect to repository

    Greetings.  I've recently (finally) upgraded from IUB 3 to IUB 5 and while our older PC's connect to the upgraded repository and image just fine, I can't get newer PC's to even grab an IP in the WinPE environment after booting off a disc (for network

  • In Which Table  I Will get Reference Document for MIGO Transaction

    Hai Experts In Which Table  I Will get Reference Document for MIGO Transaction Regards Jagadish

  • Check value of Shopping car and PO

    Hi we do have ECS in place with SRM 5.0.- The customer requests a functionality that the SC / PO ist checked upon a limit and in case the value is reached (depending on a customer own defined table) the SC or PO has to be rejected. Do you have any hi