Magnified image in new window?

Hey all,
Ive got a little coding problem yet again. Im trying to code a method that will take a portion of an existing buffered image, magnify it and display it in a new window. But right now the window is coming up, but the window is just white and does not show the magnified image. Heres my code:
public void magImage(){
Frame mag= new Frame();
mag.setVisible(true);
mag.setTitle("MagImage at " + hmult+ "X");
mag.setSize(200,200);
Graphics g= getGraphics();
Graphics2D g2 = (Graphics2D) g;
BufferedImage magi= new BufferedImage (200,200,BufferedImage.TYPE_INT_RGB);
Graphics2D magContext= magi.createGraphics();
int scalew;
int scaleh;
scalew=(int) (imgw * hmult);
scaleh= (int) (imgh * hmult);
magContext.drawImage(image,xpos,ypos,scalew,scaleh,mag);
magContext.drawImage(buffer,xpos,ypos,scalew,scaleh,mag);
magContext.drawImage(buffer,xpos,ypos,scalew,scaleh,mag);
Can anyone see whats wrong with this?
Thanks,
Rick

I don't know the details of this case real well, but often when stuff does not show up on a GUI for me I throw in a call to validate. (e.g.:
myComponent.validate ();
This wakes up the layout manager and calls repaint as well as far as I remember and can tell.
One issue you may have, which I am not sure from the code I have seen, is the window may be repainted blank after you paint it with the picture. You may want to create a component for the magnified image which extends a JPanel or such and then have the component override the paint method to ensure the object is always getting repainted.
Just a thought...
Tony

Similar Messages

  • Clicking "open image in new window" on a jpeg downloads the image

    If I click on "open image in new window" or paste an image address directly in as the url, Safari sometimes downloads that image and sometimes displays the image directly in the browser.
    Why? I'd like to always have it display directly in the browser.
    eg:
    1) this image is displayed in the browser
    http://images.apple.com/home/2008/images/promoleopard20080108.jpg
    2) this image is downloaded
    http://image.wink.com/i/d60210c3_d2lua19wcm9maWxlOmRjODM3YjIxN2E2NDVkMjQ2MDAyYmRjY2JlODIxZGIy_96f96ffffff00.jpg

    Hi,
    At a total guess, the webserver at image.wink.com is incorrectly identifying the images as something other than an image file. If they claim it's a binary file for example, then Safari will treat it like any other file you would normally wish to download.

  • Image in new window

    Hi Experts,
    I wrote a below html coding in Narrative View to open new window and show the .jpg file but in new window show the error Internet Explorer cannot display the webpage
    *<html>*
    *< target='_blank' href='http://localhost:9704/analytics/images/mediaspent.jpg'>Help</>*
    Note: I placed the above line within <a>
    *</html>*
    Here the mediaspent.jpg file located in
    E:\oracle\bise1\bi\oc4j_bi\j2ee\home\applications\analytics\analytics\res\s_oracle10\images
    and
    E:\oracle\bise1\bi\web\app\res\s_oracle10\images
    Please let me know where I did mistake.
    Thanks,
    Balaa...
    Edited by: Balaa on Jul 2, 2010 5:09 PM

    Your image adress should look something like
    http://localhost:9704/analytics/res/s_oracle10/images/report_automotive1.jpgregards
    John
    http://www.obiee101.blogspot.com/
    BTW: image name is CaSeSenSite.JpG
    Edited by: John Minkjan on Jul 2, 2010 4:12 AM

  • Display Image in New Window

    I'm using a tabular form. My image is displaying correctly. I just want it to display in a new window. The code I'm using to display the image is listed below:
    CASE WHEN nvl(dbms_lob.getlength(p.photo_name),0) = 0
    THEN 'No Photo Available'
    ELSE '<a href="#OWNER#.download_image?p_id='
             || ceah_image.lookup_picture_url(v('P112_PERSON_ID'))
    || ' height="'
    || 200
    || '" width="'
    || 200
    || '">View Photo<a/>'
    Thanks, Elizabeth

    Hello,
    In your a href you can specify target="_blank". That should open a new window for you.
    Hope that helps.
    Regards,
    Dimitri
    http://dgielis.blogspot.com/
    http://www.apex-evangelists.com/
    http://www.apexblogs.info/
    REWARDS: Please remember to mark helpful or correct posts on the forum

  • Question slide- Launch a full screen image in new window.

    Hi,
    I am using Captivate 4.
    In the question slide (MCQ/ Matching) I want to have a transparent button over a thumbnail image.
    On clicking this button, it lanches a full screen image in a new window.
    The student views the image and answers MCQ,  Matching (droplist)  on the main screen/slide of captivate.
    This new window can then be closed by clicking 'X' on top right corner of the window.
    How to do this?
    Thanks and regards
    Rajan

    Hi there
    Instead of a Transparent Button you should think instead about Click Boxes. But either way, Captivate doesn't allow Buttons or Click Boxes to be inserted on Question Slides.
    However, Captivate does allow you to insert Flash objects on Question slides. So you could develop a Flash object that would carry out the desired actions when clicked. Then insert the object on the Question slide.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcererStone Blog
    Captivate eBooks

  • When a website launches a new window to enter information, Firefox no longer automatically closes the window when you click the submit button. Why?

    For example, when I create a message in my autoresponder service and want to attach an image a new window opens up so I can enter the details of the image (url, position, alt text). When I click the Save button, the information is captured but the window remains open and I have to manually close it.
    Firefox used to close the window automatically.

    YES!! Thank you jscher2000! You sir are a legend. Thanks for this, changed the newtaburl in about:config, totally worked. Nope, never saw it happening! Speedy machine this one :P Yep, that change completely sorted the issue, just opened about 741 new tabs through the shortcut on my mouse just to celebrate. Thanks guys who helped, no thanks those who didn't.

  • How to open new window with required size when clicking on image in a table

    Hi,
    There is an image column in advanced table. i want to open new window with required parameters(size, toolbar, status bar,etc..) and with that transaction context.
    can any one help plzzzzzzzz?
    Thanks
    Raju

    You can also use OAF js function to open modal pop up:
    openWindow(self, '<url>','longTipWin', {width:900, height:400}, true); return false;
    --Mukul                                                                                                                                                                                                                                                                                                                                   

  • When a pop up window comes up it is - search bookmarks and history window! I cannot log into my bank as login button should open new window to log in but I get the search page. I cannot see larger images as again I get the search bookmarks and history pa

    When a pop up window comes up it is - search bookmarks and history window! I cannot log into my bank as login button should open new window to log in but I get the search page. I cannot see larger images as again I get the search bookmarks and history page etc. Happens on all options that should open new page. I am so frustrated, this has been happening since Firefox updated itself 2 days ago to Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 ( .NET CLR 3.5.30729; .NET4.0C) was fine before that. using windows vista. Can you please advise what I should do? Also can you go back to previous version? Error console eg
    Warning: Error in parsing value for 'cursor'. Declaration dropped.
    Source File: https://ib.nab.com.au/nabib/styles/menu_nab.css?id=009
    Line: 116
    ib.nab.com.au : server does not support RFC 5746, see CVE-2009-3555 and Warning: Selector expected. Ruleset ignored due to bad selector.
    Source File: https://ib.nab.com.au/nabib/styles/nabstyle.css?id=014
    Line: 837
    == This happened ==
    Every time Firefox opened
    == 2 days ago after update.

    Do you have that problem when running in the Firefox SafeMode?
    [http://support.mozilla.com/en-US/kb/Safe+Mode]
    ''Don't select anything right now, just use "Continue in SafeMode."''
    If not, see this:
    [http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes]

  • When I use yahoo images and i open an image in a new window, it tweakes out firefox so that panes are distorted and exerything, the whole firefox browser looks like an F5 tornado took it apart and lumped it on my desktop... is this a known glitch?

    When I use yahoo images and open an image in a new window, the page, once I click its tab causes the entire browser to scramble graphically, making it nearly impossible to navigate further. I right-clicked and selected close tab. That regains the visual clarity of the browser. But how can I fix this to browse the images?

    Phillipp,
    I tried it again using "save link as", and this time it actually worked! I just now downloaded several more using the "save link as" option, and it works perfectly. Thanks. Problem solved.
    Littleberry

  • When I click images or links that should automatically open in a new window, instead a new blank window opens.

    For some time now and after firefox has automatically been updated a few times, I click on images or links which are supposed to open in a new window automatically. A new window opens but it is blank with no toolbars, just an adress bar with nothnig in it.

    mha007, Thank you. I walked through your suggested solutions and finally disabled all add-ons and restarted them one by one. The culprit seems to be ViewSourceWith 0.8.11. Interestingly when it is enabled I had to go to TaskManager to force Firefox to quit.
    Maybe this information will help others. I don't know if the cache clearing etc helped but I would suggest that others start but Bringing up Firefox in Safe Mode (hold shift when you select the icon), disable all add-ons and then start them one by one.
    Of course if you have ViewSourceWith maybe you should just disable it first rather than go through the tedium of restarting each add-on separately. To get to the add-ons when it won't open from the toolbar type about:addons in the address area.

  • Image map (Open a link in the same place not a new Window)

    Image map (Open a link in the same place not a new Window)
    I'm using image map From KM a made a Image and I put the link like this "documents/images/image.jpg" okay, its works, but when I click on the link open other page, How to open on the same page ???????

    Hi Marcus,
    Try out this link. It may be helpful to you.
    Opening of IView in New Window
    Regards
    gEorgE

  • Opening OA page in new window using Image Bean

    Hi All,
    We have a requirement to open a new window in one of our application. It is working when I use a link but I am not able to achieve the same functionality with an image bean. Is it possible to achieve this using an image bean?
    Thanks in advance,
    Sundeep

    Sundeep,
    If you wanna use imagebean, you would have to attach action using bound values API and open secondary window in OAF.Here is the same ple code:
    OAImageBean btn= (OAImageBean)webBean.findChildRecursive("<item id of image icon bean>");
    //page url
    String page1 = "/xx/oracle/apps/XX/webui/XXPg&retainAM=Y";
    String destURL = APPS_HTML_DIRECTORY + OAWebBeanConstants.APPLICATION_JSP + "?"+ OAWebBeanConstants.JRAD_PAGE_URL_CONSTANT+ "=" + page1;
    OABoundValueEmbedURL jsBound = new OABoundValueEmbedURL(btn,"openWindow(self, '", destURL, "' , 'longTipWin', {width:"+900+", height:"+500+"}, true); return false;");
    btn.setAttributeValue(oracle.cabo.ui.UIConstants.ON_CLICK_ATTR, jsBound);
    I received your mail, and replied the same in the mail too.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Display image in a new window

    HI,
    I am new with APEX ,
    I have an application storing an image in blob column and when I click the link the image is showing in the same window, I'd like to open a new window to show the image.
    Thanks

    A simple solution would be to use a case selection so that when you criteria has been met
    then a VI pops ups with image .
    Use an exit button to terminate VI(close ).
    chow
    xseadog

  • Image in gallery - new window

    http://thebeautyroomashby.co.uk/gallery.html
    Used contentflow.js and have now finally got this gallery displaying how I want.
    Just one quick question, I was wondering if anyone knew how to overcome as I can't seem to figure it out:
    It says you can open the image in a new window (at the moment you can only open it in the same window and only when the image is in the centre (which is perfect as you need to be able to click through the gallery))
    I tried both bits of code at the bottom of this page: http://www.jacksasylum.eu/ContentFlow/docu.php
    but the problem is because it makes the images a link when you do this, you can't click through the gallery (you have to use the scroll, which is not what I want!) - so i want it to only open the image in a new windown when it's in the centre.
    I had a scroll through the js sheet but wasn't sure what I was looking at... surely as it already only opens when the image is in the centre, there must be a setting that just changes it from same to new/blank window?
    Regards
    L

    I'm not sure if there is an easier way to do it in JavaScript. However, in the link tag of each photo you can set
    target="0"
    for example:
    <canvas src="entrance.jpg" width="207" height="207" class="content landscape" target="0" title="Beauty Room Entrance" origproportion="1.5"></canvas>

  • Drag image file from Windows Explorer to a new layer in an open file

    I want to know if it's possible in CS3 to drag an image file from Windows Explorer into an already open file in PS.  Right now when I drag over, it opens that file.  I want to have it where the image is inserted as a new layer into the existing open file.  is that possible?

    Hi, I'm using CS4 and would love to be able to drag n drop straight to a new layer in an existing file.
    At present when I drag n drop I get a new image in PS. I then have to move this to my existing image. I have tried draging to the tab, the layer box, the image, the blank space, using shift,ctrl & alt.
    A simple how to would be nice

Maybe you are looking for

  • How do i get my music back onto my phone and off i cloud

    most of my tracks on my i phone have the cloud symbol with an arrow pointing down, what does this mean and why do i have to keep re loading the track when i want to listen to it? why cant i just have the tracks i choose to listen to on my phone when

  • BAPI_PO_CHANGE is not updating Confirmation Category and Date cate Category

    Hi to all,              Am using BAPI_PO_CHANGE in my program. My program is to upload excel file and transfer the data to corresponding tables. All the thing is working perfectly but the two fields in BAPI are not updating. They are CONF_TYPE and DE

  • No digital tv signal message

    When i switched my tv on i got a message saying that there is no digital tv signal found. It had another message undeneath which gave me 5 minutes before the tv switched off. I couldn't move from this screen which means I cannot access settings to tr

  • I am unable to save an e mail message to my desktop, what should I do?

    I made travel arrangements and the reservation was sent via e mail when I tried to save the reservation message I was unsuccessful. I tried each of the suggested formats but was unable to get the record with the scannable barcode saved to my desktop.

  • Midimon build error

    midimon is a GTK equivelent to KMidimon to monitor MIDI events. I began writing a PKGBUILD for it, but: Firstly, I didn't know which depends to list (later found out manually hit-and-miss from the configure.log) -- is there a better way of doing this