AS2 stage Scaling Problem

Hi..
I'm Ajanthan.. I work for a e-learning concern. Now i had a problem. I have developed the entire module with 800x600 Resolution.
But Now I got an issue that i need to reduce the content area (Shrink the contents instead of changing the resolution). Because some one had developed the custom player that will affect some of the margins of the content.
Is there any AS2 script is avail for scaling the entire stage to 80 % of its original size for the entire module... If so Please help me in this...
Thank you..
Ajanthan M

or take the as2 v-cam from the internet and put it in your flash on a new layer, and scale the vcam +20% of the stage size.

Similar Messages

  • Image scaling problem with object handles

    Hi,
    I am facing scaling problem.I am using custom actionscript component called editImage.EditImage consists imageHolder a flexsprite which holds
    image.Edit Image component is uing object handles to resize the image.I am applying mask to the base image which is loaded into imageholder.
    My requirement is when I scale the editImage only the mask image should be scaled not the base image.To achieve this I am using Invert matix .With this
    the base image is not scaled but it  is zoomed to its original size.But the base image should not zoomed and it should fit to the imageholder size always. When I scale the editImage only the mask image should scale.How to solve this.Please help .
    With thanks,
    Srinivas

    Hi Viki,
    I am scaling the mask image which is attached to imageHolder.When i  scale
    the image both the images are scaled.
    If u have time to find the below link:
    http://fainducomponents.s3.amazonaws.com/EditImageExample03.html
    u work with this component by masking the editImage.If u find any solution
    for scale only mask ,plz share the same.
    thanks,
    Srinivas

  • AS2 component sizing problem

    I experiencing a problem with the AS2 (V2) components named
    Datagrid and List. Is there a way to resize the using actionscript
    just to display more datas instead of scaling or stretching to the
    new size but still displaying the same amount of visible data.
    See? when change their size in action script, they scale or
    stretch, but I want to them to keep their aspect and offer to view
    more items at once.
    Any help will be appreciated

    Don't use _width or _height to change the size if that's what
    you're doing.
    myGrid.setSize(width, height);
    as an example if your Datagrid is called myGrid.

  • Zooming in and then zooming out in AS2 (Without scaling the image)

    Basically I want to know if there is a way to go from a zoomed in version of something, and then seeing the whole image in another frame. (By pressing a button)
    Let's say there's a tree, I would bascially like (upon pressing a button which I can do) to zoom out and see the whole scenery. Is there a way I can do this without actually changing the size of the image?

    There are various components already made on the internet such as v-cam, you can basically control the stage/view, scaling the v-cam keeps the objects on the stage the same, but scales the camera.
    Check this out, it has links to both an as2 and an as3 version.http://www.fluidanims.com/FAelite/phpBB3/viewtopic.php?f=43&t=3369

  • Scaling Problems

    I have a action script 3 project in flex 2 and I am seeing
    some sort of auto scaling that is causing me grief. This is a pure
    actionscript project. In my main class i have a background added
    and the background image size is the exact same size as the flash
    window(700x500). This is specified in the html that launches the
    swf.
    The problem is that the image is being stretched such that a
    large portion of it is off the bottom of the window. Using screen
    capture, i was able to confirm that the visible area is 700x500. If
    i add a component thats 50 in height, and screen cap it, it ends up
    being more like 80 in height.
    What i really want is a 1 for 1 pixel representation, or for
    it to scale to fit whats in the html, such that there is never
    anything cut off.
    If anyone has any ideas how this might be happening I would
    love to hear it.

    stage.scaleMode=StageScaleMode.NO_SCALE; did the
    trick.

  • Macbook to Hdtv scaling problems

    Hi there!
    I have a macbook 2008 alumiinium 2.4ghz model. I am trying to connect it to my HDTV. I bought a miniDP to HDMI and connected to my tv and it works great. The picture fits the tv perfectly, however even though it fits the screen I was wanting to use the bigger screen to work on Logic Pro as a 13in screen is a bit of a pain at times. The problem is that so far my macbook screen it being stretched to fit the 42in tv screen so I don't actually get any extra space as my screen just looks bigger!
    Any suggestions on setting to fix this? I have an LG television if that helps. I cant for the life of my figure how to get it to work. The picture on my tv is really sharp and great but its just scaling up everything on my mac when what I really want is to be able to use that extra screen real estate for my logic pro projects!!!
    Cheers in advance!
    Tom

    There is a chance that your MDP to HDMI adapter is not working properly with audio. I had that problem with one that I had bought. I tried a newer one and the sound came through with no problems.
    The only thing I would suggest (before buying a new adapter) is, try a different HDMI cable... if you have one. That way you can rule out that as being the problem.

  • Seeburger AS2 comm channel problem (B2B) - "perhaps AS2ID missing"

    Hi guys!
    We try to configure B2B scenario using Seeburger AS2, but communication channel monitor returns error:
    Error type: COMPONENT_ERROR,NOT_TRANSMITTED >> Error date: 9/25/07 10:05 AM >> Description: AS2 Adapter failure Outbound configuration error: Sender configuration incomplete - perhaps AS2ID missing.. com.seeburger.as2.AS2Plugin.execute(AS2Plugin.java:321) [9/25/07 10:05 AM]
    We're not sure about the scenario configuration and using identifiers (cos' this is probably the problem).
    Did someone of u already configured Seeburger AS2?
    We have configured in receiver party alternative identifier Seeburger - AS2ID, however, the message sent to target has always agency XI and scheme XIParty. It should be probably Seeburger and AS2ID (the alternative one).
    <SAP:Receiver>
      <SAP:Party agency="http://sap.com/xi/XI" scheme="XIParty">XXXX</SAP:Party>
      <SAP:Service>BS_3RD_XXXXX</SAP:Service>
      <SAP:Interface
    How to achieve it?
    Thanx a lot!
    Peter

    Hi Anoop!
    Yes, we use it on receiver side.
    ModuleProcessorExitbean exists, so it should be ok.
    What I'm not sure about is the thing with identifiers..
    In Party (let's call it X) - Identifiers, we have default agency http://sap.com/xi/XI, scheme XIParty and name X.
    What values should be there for Seeburger?
    We have Agency: Seeburger, Scheme: AS2ID; Name: X.
    Is it correct?
    We also received some 9 char long number - probably some ID to adapter(?). Any idea, if it is necessary and where to use it?
    Is it necessary to configure identifier seeburger also in Identifiers tab of Receiver communication channel? Or we can leave it empty (both- sender, receiver)?
    We use this in B2B scenario, of course: Target system is party, but we use our R/3 as Business System w/o party. Is it ok, or do we laso have to "be" as Party in our configuration scenario?
    A lot of questions, but points will be awarded 4 sure
    Thanx!
    Peter

  • BRM Approval Process and MSMP Stage Configuration Problems!

    G'Day All,
    I've raised a question in the following blog but it got to a stage where it is not related to the original post anymore. So I would like to draw upon your collective knowledge and appreciate it if you all can jump in and help me out here.
    http://scn.sap.com/thread/3555700
    So this is where I'm at this point:
    Why use two kinds of Approvals in BRM Role Generation?
    Role Content Approval - Through BRF+ Condition
    MSMP Approval - Role Owner etc
    It seems redundant to have two approvals for pretty much the same thing. I believe in both cases (I am guessing) the Approver would be the same person, approving precisely the same thing. So why not have just one?
    Is there a way I can tie up the BRF+ Approver Rule I created, with an 'Agent Rule' in MSMP so I can use the conditions defined to dictate who the request should go to.
    For Example:
    Condition1: Then Request should go to Approver1
    Condition2: Then Request should go to Approver 2
    * These Conditions are defined in BRF+ Approver Rule and linked in IMG and 'Role Owners' in NWBC.
    Alternatively, I tried creating an Initiator Rule from scratch for SAP_GRAC_ROLE_APPR Process ID, using BRF+ with the exact same conditions and everything seems to be OK except the Configuration ID part in Stages. Screen shots of my MSMP WF is as follows:
    Step 1: Process ID
    Step 2: Maintain Rules
    Step 3: Mantain Agents
    Step 5: Maintain Paths
    Step 6: Route Mapping
    I have encountered errors while generating the WF, which are as follows:
    I tried defining my own configuration ID for Stage 1:
    So I tried changing the name of the config ID thinking maybe there is a particular naming convention I have to follow:
    Next I tried using the default configuration ID and link my Agent ID to it:
    So I would appreciate it if any of you could tell me what on earth is happening as I never had this problem with my other Initiator Rules. Is there a particular 'Naming Convention' for stage config IDs or can I give anything as long as they start with a Z/Y/X?
    Regards,
    Leo..

    Hiya Colleen,
    For each path did you go into the Stage Settings of the Step?
    No I haven't as at this point my focus is on testing the WF, so I haven't really mucked around with any settings. So let me know if there is something I need to do in Stage Settings please.
    By the way, the default approval is useful if you are actually using the SAP delivered Agent Rule for roel Owner.
    Thank You.I gathered that from my problem.
    Are you splitting the intiator rule as you want to send the request to different approvers or because you want to do different approval steps? If the first scenario (different approvers) you could just use the BRF+ rule to set the approvers. But if you want the different levels of approval then the MSMP would be used.
    I only created this Initiator Rule because I wasn't sure how to Integrate my Approver Rule created in BRF+ with MSMP WF. My intention is to send the approval to its intended Approver based on the defined Condition. So I believe BRF+ will take care of this as long as long as the 'SAP delivered Agent Rule for Role Owner' is used (as pointed out by you earlier).
    Another thing - for the initiator rule you have covered Single Role Sensitive and Non Sensitive but do you have any other Roles? If so, you have not factored them in.
    Again at this point I am just testing and trying to learn how to integrate BRF+ into Role Methodology Process, so I just picked Single Roles.
    Regards,
    Leo..

  • LoadMovie (swf) scaling problem...

    I have a movieClip for loading external pictures or SWF files
    that's works just fine - unless the loaded SWF has an object that
    is located or moves off the stage (it's original stage - the one
    the loaded SWF was published with). The movieClip rescales the SWF
    to keep the object in view. For example, if a line of text starts
    off-stage left and is tweened to off-stage right, the movieClip
    will zoom in, then out, to keep it displayed.
    While this may one day be a nifty effect to play with, it's
    not what I intended.
    I've tried using this in the loaded SWF:
    Stage.scaleMode = "noScale";
    and this in the loading movie:
    myMovieClip._lockRoot = true;
    Thinking this would prevent the loaded SWF from scaling (and
    to make sure the loading movie didn't think I was telling *it* to
    stop scaling...), but that didn't work. I tried to rework the
    loaded SWF so that nothing actually left the stage, but the effect
    doesn't work with text or bitmap images (they skew) and the
    animation gets a bit jumpy. I'd like to avoid converting it to an
    animated GIF or movie, since GIFs don't animate and I'm concerned
    about file size (and I'd like to able to allow for SWFs that may do
    things those simply can't do).
    I'd also like to keep it a movieClip, since I want it to be
    able to still accept images.
    I'm pretty sure there's an easy answer to this - maybe I just
    screwed up with my placement of the code above (in the loaded SWF,
    it's the first line of actionscript to run; Scene 1, frame 1 -- in
    the movieClip movie, it's the line right after the movieClip is
    created with createEmptyMovieClip and right before the SWF is
    passed to it).
    So, is there a way to prevent a movieClip from resizing a
    loaded SWF that contains elements off-stage?

    Okay, first, let me say, I completely forgot to move the
    loading movieClip's registration mark to the top-left corner; when
    I did that, it stopped the wierd scaling when the objects were
    off-stage top and left.
    I then tried masking as you suggested, and it did work, sort
    of - the area where the mask covered the right and bottom still
    showed, at least the mask did (which surrounded, but was not on,
    the stage). The result was a little version of the loaded SWF,
    surrounded by a border right-and-bottom.
    That's when I realized that flash ignores the stage
    completely with loaded SWFs. Yeah, I know, I should have got that
    when I had to replace the background color with a rectangle on a
    bottom layer.
    It then struck me exactly what I did wrong - the function
    that resizes the SWF to match the loading movieClip's size was
    still looping (all it did was check to make sure the loaded SWF was
    completely downloaded, then size it), and when things went off
    stage, they were taken into account everytime. I setup a flag that
    indicates whether or not an image or SWF has been loaded and sized.
    That fixed it.
    That's what I get for writing actionscript at 3 in the
    morning.
    I'm not sure if this will still work for symbols that start
    off-stage right or bottom (the registration mark prevents them from
    showing left and top regardless of the resizing). A single starting
    blank frame should fix that, though.
    Thanks for your help - I was ready to give up and stick with
    static images.

  • BizTalk AS2 Certificate configuration problem

    Hi,
    I'm having a problem with signing a certificate to send port. I have imported 2 diferent certificates in mmc to "Local Computer\Other People" and "Local Computer\Trusted Root Certification Authorities". Then I went to BTAdmin and select
    some Send Port then Certificate then Browse. One of certificates was there and other was not.
    Then I went on this page
    http://msdn.microsoft.com/en-us/library/bb728096.aspx and found this:
    "Certificates used for AS2 transport must have the attributes required for their
    intended use. For signing and signature verification, the Key Usage attribute
    of the certificate must be Digital Signature.
    For encryption and decryption, the Key Usage attribute
    of the certificate must be Data Encipherment or Key
    Encipherment. You can verify the Key
    Usage attribute by double-clicking the certificate, clicking the Details tab
    in the Certificate dialog
    box, and checking the Key Usage field."
    I have noticed that the certificate that is not showing in BTAdmin, does not have field "Key Uasge", but other one does have and its value is "Digital Signature, Key Encipherment (a0)". Is there any way to configure that
    "not working" certificate, so that I can select it in BTAdmin or this is dead end?
    Thanks in advance,
    TG

    In AS2 BizTalk a certificate on a Send Port would be is for signing and/or  for encryption. So there is not any way to configure the existing/in present certificate. So one should have
    to request a new one with there right key usage.
    http://www.athenainfotech.co.uk/managed-b2b-services

  • Scrollable frame scaling problems

    Hello all,
    Having a funny problem I've never encountered before. I've got the usual set-up for a scrollable frame ( content / content frame ) I've grouped it all together and then when I paste it into the content frame it either scales itself down and then when I tried it again it scaled itself up. The content in question is a combination of picture and text. Anyone encountered this before? Any solutions? The only solution I found was to copy an old scrollable box box from an old page.
    As always any help is much appreciated.

    Right click the frame and choose Fitting > Frame Fitting Options. Deselect Auto-Fit:

  • Charts data axis scaling problem

    Post Author: rameshp
    CA Forum: Charts and Graphs
    Hi ,
    I work on crystal reports XI.
    I'm facing problem regarding scaling data axis. I have illustrated that in the following lines:
    case1) if i have high values (sum of bytes) like more than 600 etc. its scaling data axis from 0 to say 1000.
    case 2) if i have low values like 0,1 (bytes)   then its scaling from -4 to say 6 .
    I don't want negative values on data axis .  I want from 0 to max. So what's the better way to do this using chart expert.
    Your suggestion is highly appreciated !
    Thanks,
    Ramesh.

    Post Author: jsanzone
    CA Forum: WebIntelligence Reporting
    satwar,
    There is no "trick", we're just victims of the limitation that WebI has in portraying XYZ type charts to our better liking.  I submitted a request to Business Objects Tech Support in Oct 2006 and became the proud holder of two ADAPTs:
    ADAPT00676587 u2013 for the scaling issueADAPT00676609 u2013 for the stacked bar chart, line graph issue
    When fully implemented, the scaling for Y and Z should be able to correspond to each other.  For instance, max value of Y and max value of Z will set on both scales the same max value.  I don't discourage you from submitting a trouble-ticket, perhaps if they get more noise on this situation they'll resolve my (our) ADPAT sooner, but just hoping....

  • 9-slice scaling problem on symbols

    Hi there.
    If I have a 9-slice scaling guide setup on a symbol, then
    drag it onto the canvas.
    I have an issue.
    When the image is dragged onto the canvas, the bounding box
    is too large, like it doesn't accurately represent the actual image
    data of the symbol.
    So say I had a rounded rectangle that was 100x20 (px), and I
    added 9-slice scaling guides on it.
    When I drag that symbol to the canvas, the symbols' bounding
    box is no longer 100x20, but more like 150x40(px).
    Anyone know why this may be happening?
    I do have layer effects on the symbol in question.

    bcharan wrote:
    > I think I figured out what the problem is, but not how
    to fix it. Here is the
    > png:
    http://www.flickr.com/photos/brijcharan/2243159150/
    So the issue seems
    > to happen when I use photoshop live effects. If I
    disable it, the bounding box
    > is fine. Check the above image and you'll see the
    difference. The left one has
    > the effect, the right one has it disabled. you'll see if
    you select the left
    > symbol, the bounding box looks much larger than the
    image itself.
    >
    Photoshop layer effects use the entire layer, rather than
    just the
    object. Try using native Fireworks effects, or create your
    slice
    manually in the symbol.
    Jim Babbage - .:Community MX:. & .:Adobe Community
    Expert:.
    http://www.communityMX.com/
    CommunityMX - Free Resources:
    http://www.communitymx.com/free.cfm
    .:Adobe Community Expert for Fireworks:.
    Adobe Community Expert
    http://tinyurl.com/2a7dyp
    See my work on Flickr
    http://www.flickr.com/photos/jim_babbage/

  • Trying to sum up the QHD/scaling problems and solutions

    Hello all,
    For a while I've been thinking about buying the Yoga2 -pro, yet I was (and am) worried about the high resolution making everything too small to work with. 
    Since there are so many posts (some with conflicting stories) in this forum regarding this issue, I'm trying to sum up where things stand at the moment,  especially as for what solutions are there at the moment and how do they work. 
    My uses are very simple, I surf the web allot using chrome, I read many pdf files using PDF exchange viewer and zotero as a file manager, I also use office 2010/13, dropbox, and also two research related software called atas.ti and SPSS.
    From what I've been reading there are two solutions - 
    1. Using windows 8.1 new scaling option. This works for most programs but not for all.
    My questions are: how bad is it when a progrma does not scale right. Is it still possible to use it ?   
    If anyone uses one of the programs mentioned above and can tell me how do they handle the highdpi setting It  would be great. 
    2. I've seen some posts about people how set their screen resolution to a lower resolution, (usually regular HD) then the native one. 
    Is that works well as if the screen was a regular hd screen, or does it create different problems ? (if not that might be the solution for me, as I really don't care much for qhd)
    Thanks 

    gshani wrote:
    Hello all,
    For a while I've been thinking about buying the Yoga2 -pro, yet I was (and am) worried about the high resolution making everything too small to work with. 
    Since there are so many posts (some with conflicting stories) in this forum regarding this issue, I'm trying to sum up where things stand at the moment,  especially as for what solutions are there at the moment and how do they work. 
    My uses are very simple, I surf the web allot using chrome, I read many pdf files using PDF exchange viewer and zotero as a file manager, I also use office 2010/13, dropbox, and also two research related software called atas.ti and SPSS.
    From what I've been reading there are two solutions - 
    1. Using windows 8.1 new scaling option. This works for most programs but not for all.
    My questions are: how bad is it when a progrma does not scale right. Is it still possible to use it ?   
    If anyone uses one of the programs mentioned above and can tell me how do they handle the highdpi setting It  would be great. 
    2. I've seen some posts about people how set their screen resolution to a lower resolution, (usually regular HD) then the native one. 
    Is that works well as if the screen was a regular hd screen, or does it create different problems ? (if not that might be the solution for me, as I really don't care much for qhd)
    Thanks 
    I'm running 3200x1800 at 185% Windows scaling, and everything looks perfect.
    Really, the screen is so good and sharp that going down from this resolution to 1920x1080 feels almost like going down from 1920x1080 to 1366x768.
    There are only very few apps that don't scale properly and look tiny. Adobe's apps such as Photoshop, Viber, Dropbox, FastStone Viewer. Viber anyway has modern app, which works and behaves perfect.
    If you want to keep your laptop for more than a year then I'd say it's well worth to go for a higher resolution. This trend is just accelerating.
    But, even right now, practically all everyday desktop apps work perfectly at regular 3200x1800 resolution, with Windows scaling that you can choose, 200% being a default one.
    When resolution is changed to 1920x1080 the resolution doesn't look at all that bad as I expected. In fact, it looks pretty decent. Maybe not as sharp as native 1920x1080 display, but pretty close. I bet most people would hardly notice a difference...
    Normally, LCD displays look all blurry if set to anything else than their native resolution. But Yoga 2 Pro has pentile display, which doesn't have full 3 RGB subpixels for each pixel but more like 2 and half, and so it actually scales better and sharper when set to non-native resolution.
    Additionally, the very high native resolution makes everything look better at non-native resolution, such as 1920x1080.
    Bottom end - there's really no need, if at all, to run any other resolution than native 3200x1800. You just adjust Windows scaling to what you like and enjoy the super sharp screen.
    I've read about this issue before I bought my Y2P, and was concerned a bit, but now that I have it and use it I see there's no reason for any worry.

  • Image scaling problem

    Hello,
    I have been trying to scale an image to create a thumbnail. The thumbnail image size is around 200*200. The thumbnail is to be rendered on a web browser. My code is:
    public static byte[] getScaledImage(InputStream imageData) throws IOException {
           Image origImg = ImageIO.read(imageData);
           int origImgHeight = origImg.getHeight(null);
           int origImgWidth = origImg.getWidth(null);
           int newImgHeight /*determined by custom logic*/;
           int newImgWidth /*determined by custom logic*/;
          /* code for determining newImgHeight and newImgWidth  keeping the aspect ratio */
           origImg = origImg.getScaledInstance(newImgWidth, newImgHeight,
                                               Image.SCALE_AREA_AVERAGING);
           BufferedImage bimage = null;
           bimage = new BufferedImage(origImg.getWidth(null), origImg.getHeight(null),
                                      BufferedImage.TYPE_INT_RGB);
           Graphics g = bimage.createGraphics();
           g.drawImage(origImg, 0, 0, null);
           g.dispose();
           ByteArrayOutputStream os = new ByteArrayOutputStream(10);
           ImageIO.write(bimage, "jpg", os);
           return os.toByteArray();
    }The calling method is:
    FileCopyUtils.copy(ImageUtils.getScaledImage(lobHandler.getBlobAsBinaryStream(rs, 1)),
                                          imageContent);here imageContent is the http response's outputstream.
    Now the problem is the resulting image displayed on the web page becomes distorted. I first thought that this is due to the thumbnail size. But the scaling done by gimp does not distort the image.
    I have also tried this:
    BufferedImage thumbImage = new BufferedImage(newImgWidth, newImgHeight, BufferedImage.TYPE_INT_RGB);
           Graphics2D graphics2D = thumbImage.createGraphics();
           graphics2D.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
           graphics2D.drawImage(origImg, 0, 0, newImgWidth, newImgHeight, null);instead of using getScaled instance.
    What could be the problem? This is a problem I need to solve immediately. So I am at a loss. Please help me here.

    Try scaling your source image like this:
    import java.awt.*;
    import java.awt.geom.AffineTransform;
    import java.awt.image.BufferedImage;
    import java.io.*;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    public class ScalingToSize {
        int W = 200;
        int H = 200;
        int SCALE_TO_FIT  = 0;
        int SCALE_TO_FILL = 1;
        private JPanel getContent(BufferedImage image) {
            JPanel panel = new JPanel(new GridBagLayout());
            GridBagConstraints gbc = new GridBagConstraints();
            gbc.insets = new Insets(5,5,5,5);
            gbc.weightx = 1.0;
            panel.add(wrap(image), gbc);
            panel.add(wrap(scale(image, SCALE_TO_FIT)), gbc);
            panel.add(wrap(scale(image, SCALE_TO_FILL)), gbc);
            return panel;
        private BufferedImage scale(BufferedImage src, int style) {
            int type = BufferedImage.TYPE_INT_RGB;
            BufferedImage dest = new BufferedImage(W, H, type);
            Graphics2D g2 = dest.createGraphics();
            if(style == SCALE_TO_FIT) {
                g2.setBackground(UIManager.getColor("Panel.background"));
                g2.clearRect(0,0,W,H);
            double scale = getScale(src, style);
            double x = (W - scale*src.getWidth())/2;
            double y = (H - scale*src.getHeight())/2;
            AffineTransform at = AffineTransform.getTranslateInstance(x, y);
            at.scale(scale, scale);
            g2.drawRenderedImage(src, at);
            g2.dispose();
            return dest;
        private double getScale(BufferedImage image, int style) {
            double xScale = (double)W/image.getWidth();
            double yScale = (double)H/image.getHeight();
            return (style == SCALE_TO_FIT) ? Math.min(xScale, yScale)
                                           : Math.max(xScale, yScale);
        private JLabel wrap(BufferedImage image) {
            ImageIcon icon = new ImageIcon(image);
            return new JLabel(icon, JLabel.CENTER);
        public static void main(String[] args) throws IOException {
            String path = "images/cougar.jpg";
            BufferedImage image = ImageIO.read(new File(path));
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(new ScalingToSize().getContent(image));
            f.pack();
            f.setVisible(true);
    }

Maybe you are looking for

  • Portal Internal Error - structure field Umskd not found

    Hi Experts, I am facing a problem in ESS leave application screen. The error is:- com.sap.tc.webdynpro.progmodel.context.ContextConfigurationException: DataNodeInfo(FcForm.Orig_Request.Item_to_Check_Orig): structure field Umskd not found     at com.s

  • ITunes freezes after a sync and then clicking to disconnect

    My iTunes is behaving very strangely lately.  After I've done a sync (with my iPod Nano 6th gen), which works fine, and then click the disconnect button iTunes locks-up.  It displays the spinning beach ball but never stops and I can't quit iTunes wit

  • How to add new data file

    Hi Friends, We have 4 below file systems. Sybase/TST/sapdata_1 Sybase/TST/sapdata_2 Sybase/TST/sapdata_3 Sybase/TST/sapdata_4 Already we have added one data file each in sapdata_1 and 2.  Sapdata3 and 4 are emptry. How to add new data file in sapdata

  • Windows Users Connecting to a OS X Server

    We are running into a issue with our Window's users. We have a FileMaker database that we use as a PDF proofing system. All of the PDFs in FileMaker, are links to the actual PDFs that are stored on one of our shared drives. The Window's users have to

  • Remote Persistency through RFC

    Hi Experts, I have created a CAF Application in which I am using external services of type RFC's to create and retrieve records from R/3, But when I try to create record, I get the exception <b>"com.sap.caf.rt.exception.CAFCreateException."</b> Simil