Container && Images ..Is it possible?

Hi Sun Team and Swing Fans !
Well I have the following code:
public class dataTable extends JApplet {
..bla bla .bla boring stuff!!!
public void init () {
Container contentPane = getContentPane();
contentPane.setLayout(new FlowLayout());
contentPane.setLayout(null);
contentPane.setBackground(new java.awt.Color (0, 153, 153));
..bla bla more boring stuff!!!
Is it possible, instead of setting a background color, to set a background image, like the background of my layout panel would be an image instead of a color. If yes how would I implement it?
Thank you very much in advance, Albert.

U override the
public void paintComponents(Graphics g)
method in JApplet.
i think that should work fine
Raj

Similar Messages

  • How to: Save many PDF files containing images as jpeg

    I have a whole lot of PDF files that only contain images. I need them to be in jpeg format however.
    To convert them I'd need to open all theses pdf files in Preview and then "save as" jpeg. This does the job wonderfully.
    But it only does so for one pdf/image at a time. There's no way I can do this for all the files.
    I need to preserve the pdf files' names, too, so I can't combine the files and insert them into one pdf. This would result in having jpegs all right, but with names that do not represent the original file names.
    How can I batch process this with Preview?
    I tried the Automator but haven't found any way of doing it there.
    Does anyone have an idea how to accomplish that?

    Hi PPAC,
    What version of Windows are you running? I found another thread about this particular issue, with two possible solutions. One is to make sure that you're logged in as an administrator, and the other is to change the compatibility to earlier version of Windows. (Right-click the Acrobat application icon, choose Properties, and then choose compatibility.)
    I'm also curious what export settings you're choosing when you save as JPEG...
    Best,
    Sara

  • Document Contains Errors - Approval not possible

    Hi,
    We are having issue in our Invoice Workflow.
    When ever the approver is trying to approve the document, he is getting the error message "Document Contains Errors -> Approval not possible".
    We have verified the document and check for error messages and found the below error messages on the Document.
    E BBP_PD              047 Posting period 006 2011 is not open.
    The document was submitted some time in the first week of December and as part of AP process the posting period will be closed during the first week of every month.  This is a common business case and why is it stopping from posting the doc?
    FYI..this Invoice is posted against the WBS element.
    Pls give some insight on this and how to address the issue.
    Regards,
    Satya

    Hi,
    The posting date in the invoice is referring to the past period which is closed.You will have to change the invoice posting date to current period date and then process.
    Regards,
    Sanjeev

  • Am exporting html table containing images data into pdf and after exporting images are not displaying in pdf document.

    Hi all,
             I trying to export html table which contains images into pdf through java script but after downloading pdf file am unable to see images.Is this problem with plugins are any other.Can any one help me out from this.
    Thanx in advance.

    Another option will be
    window.print(); as pdf. 
    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

  • How to display an HTML data which contains images in CR

    Hi Experts,
    I have a HTML file which contains images and text. I will store all this data in to the database as binary data(SQL server 2008). How can I display the whole  data in report.
    Thanks in advance,
    Salah

    hello all,
    most times when HTML is stored in a database there are many tags that will not work. the tags that will work are very basic and limited to the formatting types that you can do within a Text Object...so not much.
    if you need all of the HTML from a database interpreted, you need to activate pass-through html on your system. then if you put the field into a formula (one line in height) the HTML should be properly displayed. for more info on activating pass-through html see the beginning of the Users Guide for webelements that is in the main download [here|Crystal Reports webElements].
    please note that there are some major limitations in this method:
    1) you cannot print the html displayed when using the print button on the crystal reports toolbar as it will show up as text...you can try the browsers print functionality to see if that works for you
    2) you can not export the report and see the html displayed...it will show up as text
    3) pagination may not work for you...i.e. if you have an especially long section of html in your database, the page may not break where you want it to
    best of luck,
    jamie

  • Problem in downloading an html page that contains images

    Hi,
    This is surekha
    I am facing a problem in downloading an html page that contains images
    The file is downloading , but when I access the the downloaded file it displays X marks in the place where images r present....
    How can i download a html file along the images it contains
    Please help me ...........

    Try posting at the Web Development / Standards Evangelism forum at MozillaZine. The helpers over there are more knowledgeable about web page development issues with Firefox. <br />
    http://forums.mozillazine.org/viewforum.php?f=25 <br />
    You'll need to register and login to be able to post in that forum.

  • Displaying an RTF document that contains images

    Hello,
    I am trying to display styled text that contains images. I thought the simplest way to do this was to save my documents as RTF documents, and display them through the JEditorPane. But, when the JEditorPane display the documents, the text is styled properly, but there are no images being drawn. Is the JEditorPane capable of displaying RTF files that contain images?
    My main objective is to display documents in Java that other people have created; so if there is some other small libraries that can do this. I would be interested. I need to display the documents in an applet, so I want the library to be small.
    Thanks
    Vance

    JEditorPane will render HTML and basic CSS with images.

  • How move a physical disk directory that contains images

    PSE 11. How can I move a directory on my hard drive that contains images to another drive from within PSE 11? Thanks.

    Hi Bazsl,
    Just a quick answer, late to pick up my wife -grin.
    Starting with the assumption you are just seeing the column of directories without the indication of what drive they are on:    If So then:
    On the left margin next to the begining of the yellow folders aka directories, there is a small symbol of two yellow folders, if you click it the normal directory view will appear  (also assuming you are familar with earlier versions of PSE ).
    Then you can click and drag the directory to its new location, again the system may take a few minutes to complete the move if you have a big catalog of pictures...
    gotta run..
    Al

  • Resizing 1) background images and 2) div's containing images

    I just created a web page consisting of little more than an image (about 900 pixels) wide which is set at width=100% in a style sheet. It works great, but I'd like to substitute a smaller image (to reduce page loading time) in mobile devices.
    If it was a background image, I could just declare two different background images based on screen size, but I don't know of any way to swap between images actually inserted in a page.
    So, is it possible to give a background image a width in percentage, similar to a static image? In other words, if my screen was 651 pixels wide, then a static image inside a container spanning the entire screen should also be 651 pixels wide. Can I rig it so that a background image in that container would also be 651 pixels wide?
    Of course, the obvious problem is height. If a background image measures 900 X 1200 pixels, and a screen is 600 pixels wide, then even if there's a style that makes the image 600 pixels wide, it would also have to calculate a height of 800 pixels, and I'm guessing that can't be done.
    Anyway, I'd just like to know what kinds of tricks one can use in making background images and divs containing static images display in percentages based on screen size.
    Thanks.

    Use background-size:cover; for your background images.
    Further reading: http://css-tricks.com/perfect-full-page-background-image/
    EDIT:// For swapping out placed images, it's a little harder to do right now as there is no specified solution from W3C. Some people want to use the srcset attribute, others the <picture> tag. There is no perfect approach right now. See: http://mobile.smashingmagazine.com/2013/08/21/webkit-implements-srcset-and-why-its-a-good- thing/
    One idea is you could hide the image and then load a background-image in the container which is smaller in size. But this would likely bloat your HTML and CSS as you use multiple images - the device will also load both images so you don't gain any real advantage unless you intend to show a croppoed or different image.
    Other ideas: http://mobile.smashingmagazine.com/2013/07/08/choosing-a-responsive-image-solution/
    <div class="image">
         <img src="YourImage.jpg" alt="" width="500" height="250" />
    </div>
    @media only screen and (max-width: 480px) {
         .image img {display:none;}
         .image {
              background:url("YourImage_Mobile.jpg") no-repeat 0 0;
              background-size:cover;
    Another idea is to show/hide the relevant image:
    <img src="YourImage.jpg" alt="" width="500" height="250" class="desktop" />
    <img src="YourImage_mobile.jpg" alt="" width="300" height="180" class="mobile" />
    @media only screen and (max-width: 480px) {
         .desktop {display:none;}
         .mobile {display:block;}

  • Acrobat Reader DC - Bug with Dialog Boxes Containing Images?

    Hi all -
    Been testing Reader DC.  Only took a couple of minutes to adjust to the new interface; pretty slick and intuitive.
    Noticed a potential issue that I wanted to warn/share/prob solve with the community.
    I was putting Reader DC through it's paces with a XFA PDF that has some dialog boxes, some of which even had images in them.  (Thanks again to BR001.)
    The dialog boxes with images look great on Acrobat & Reader 9/10/11 (WIN & MAC) - images are clear; no pixelation.
    Reader DC on MAC appears to be fine - resolution looks the same.
    But Reader DC on WIN - the images are now pixelated. Especially around the edges, characters/numbers, etc.  You can tell something is "off" with the image.
    A few simple side-by-side tests can be seen at links below.  Reader DC is on left; Acrobat 9 (9.5.5) is on right.
    Green smiley face: Dropbox - icon differences.PNG (83 x 83)
    Lightroom image: Dropbox - Lightroom Image - Comparison Test.PNG (225 x 132)
    Reader DC banner image: Dropbox - Reader DC Banner--- Comparison test.PNG  *MOST VISIBLE ON THIS EXAMPLE (ironically) (422 x 45)
    Simple banner with words image: Dropbox - Simple Banner - comparison test.PNG (342 x 100)
    PDF containing the 4 buttons that triggered these dialog boxes: Dropbox - Dialog Boxes with Images - PDF - LC community.pdf
    Bug in Reader DC for Windows? Not sure what else the cause could be...
    Anyone having their dialog boxes with images open in Reader DC for Windows WITHOUT the pixelation?
    FYI/thoughts/ideas/suggestions/confirmations?  Hmmm.....
    Brian

    Little easier; picture's worth a thousand; etc.
    Shortcuts to zoom in/out further for most web browsers: ("ctrl" & "+") or ("ctrl" & "-");

  • Executable JAR containing images doesn't load them

    I'm using Netbeans 4.0 for developping a Java Application. This application is composed of 3 packages:
    - daemonexplorerv10: which contains the main class.
    - GUI: which contains classes I use to create the GUI of the application.
    - images: which contains GIF and PNG images used by the application. It also contains a class named ImageLoader which is used to load the images contained in the package. I will detail this class later.
    My main class, named Main.java, simply lauches the main JFrame of the application GUI. Here is the code of it's main method:
    public static void main(String[] args) {
            //Schedule a job for the event-dispatching thread:
            //creating and showing this application's GUI.
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    MainFrame.createAndShowGUI();
        }In the GUI package, I created a class named MainFrame which extends JFrame and is the main frame of my application GUI. Here is the code of it's method createAndShowGUI:
        public static void createAndShowGUI() {
            //Suggest that the L&F (rather than the system)
            //decorate all windows.  This must be invoked before
            //creating the JFrame.  Native look and feels will
            //ignore this hint.
            JFrame.setDefaultLookAndFeelDecorated(true);
            //Create and set up the window.
            MainFrame main_frame = new MainFrame(main_frame_title);
            main_frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            //Display the window.
            main_frame.pack();
            main_frame.setVisible(true);
        }And here is the beginning of the code of it's constructor:
        public MainFrame(String title) {
            super(title);
            ImageLoader il = ImageLoader.getSingleton();
            ImageIcon application_icon = il.loadImage("application_icon.png");
            if (application_icon != null) {
                this.setIconImage(application_icon.getImage());
            else {
                System.out.println("Error - application_icon could not be loaded");
    ...As you see, MainFrame uses ImageLoader so as to customize the frame icon. ImageLoader follows the singleton pattern. It has a method called loadImage which returns an IconImage for a given image name. Here is the code of this method:
        public ImageIcon loadImage(String image_name) {
            ClassLoader cldr = this.getClass().getClassLoader();
            URL image_url = cldr.getResource("\\images\\"+image_name);
            if (image_url != null) {
                return new ImageIcon(image_url);
            else {
                return null;
        }For every image I want to use in my application, I use ImageLoader. It fetches the image thanks to the given name, provided that the image is placed in the package called images, or else the method loadImage returns null.
    So the MainFrame uses ImageLoader which fetches the image "application_icon.png" for the frame to set it as it's custom icon.
    My application runs perfectly well :)... as far as I run it through Netbeans launcher. But Netbeans also creates automatically an executable JAR file for each builded application. So I tried to lauch this JAR. Through this way, the application works, but all the images that should be loaded aren't!
    I unpacked the JAR so as to check if all the images are in it. Netbeans includes the images. Netbeans also creates a manifest file which seems perfectly correct.
    So I can't understand why my application runs without any images when I launch it through an executable JAR while it works fine (with all the images) when I lauch it through Netbeans.
    I checked many forums to find a solution. Using ImageIO doesn't or ToolKit doesn't solve the problem. It simply seems that the path of the package called images can't be found by the method getResource when this package is compressed in the JAR.
    P.S: I use J2SE Development Kit 5.0 and J2SE Runtime Environment 5.0.

    So ReinerP, I tried your code today in a little test application which has a single package containing two classes:
    - Main.java
    - JMainFrame.java
    Here is the code of Main.java:
    public class Main {
        /** Creates a new instance of Main */
        public Main() {
         * @param args the command line arguments
        public static void main(String[] args) {
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    //Suggest that the L&F (rather than the system)
                    //decorate all windows.  This must be invoked before
                    //creating the JFrame.  Native look and feels will
                    //ignore this hint.
                    JFrame.setDefaultLookAndFeelDecorated(true);
                    //Create and set up the window.
                    JMainFrame main_frame = new JMainFrame();
                    main_frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                    //Display the window.
                    main_frame.pack();
                    main_frame.setVisible(true);
    }And here is the code of JMainFrame.java:
    public class JMainFrame extends JFrame {
        /** Creates a new instance of JMainFrame */
        public JMainFrame() {
            super();
            //load and set icon
            URL imgURL = JMainFrame.class.getResource("icon.png");
            ImageIcon img = new ImageIcon(imgURL);
            setIconImage(img.getImage());
    }As you said, it works :). It works when I run it through Netbeans launcher, and it also works when I run it through the Executable JAR Netbeans generated during the building of the application.
    So I adapted the code of the application I was talking about in the first post of this topic. I modified the code of the method loadImage in ImageLoader.java:
    public ImageIcon loadImage(String image_name) {
    //not working in JAR:  ClassLoader cldr = this.getClass().getClassLoader();
    //not working in JAR:  URL image_url = cldr.getResource("\\images\\"+image_name);
            URL image_url = ImageLoader.class.getResource(image_name);
            if (image_url != null) {
                return new ImageIcon(image_url);
            else {
                return null;
        }And it works well. Thanks again. However, I still can't explain why the use of class loader isn't undertood by the executable JAR.

  • Image + 1180 error + possibly undefined method

    Below is a piece of code I've written and getting an "1180: Call to possibly undefined method test".
    <mx:Script>
    <![CDATA[
    public function testDC(): void {
        Alert.show("Testing");
    ]]>
    </mx:Script>
    <mx:Panel id='Test' title = 'Test' width = '100%' height = '100%' creationPolicy="all" backgroundColor="white" backgroundAlpha=".01">
    <mx:VBox label = 'Topology View' showEffect = '{wipe_left}' width='100%' height='100%'
    cornerRadius="5" paddingBottom="15" paddingLeft="5" paddingRight="5" paddingTop="15" clipContent="true">
                <adobe:SpringGraph id="springgraph" width="100%" height="95%" bottom="0" top="40"
                right="0" left="0" clipContent="true">
                <adobe:itemRenderer>
                <mx:Component>
                <mx:Image width="24" height="24"
                                    source="{(data.id==null)?'': (data.id.search('\\.') > 0) ? 'assets/icons/teacher.png' : 'assets/icons/student.png'}"
                                    toolTip="{data.data}" doubleClickEnabled="true" doubleClick="testDC()"/>
                </mx:Component>
                </adobe:itemRenderer>
    </adobe:SpringGraph>
    </mx:VBox>
    </mx:Panel>
    If I do not call the method, I don't get the error, but I need to perform some operations on the clicking the image.
    1. I've also tried to use icon, but with no success.
    2. I've tried to remove the <adobe:itemRenderer> and the <mx:Component> tags, in this case the images don't get loaded and the screen looks bad.
    Any help?

    I put the script tag within the image tag and it worked.

  • Specifying an element attribute containing a colon not possible

    Hello everybody
    Might be a stupid question... I'm trying to define a datatype in XI (3.0 SP16) integration repository. This datatype has one root element and some child elements. The root element requires some attributes, one named "xmlns:xsi". Unfortunately this is not accepted from XI! The colon is not accepted.
    So how do I specify such attributes in XI datatype elements?!?
    Thanks for some guidance / help!
    Kind regards,
    Renaud

    Hi Renaud,
    indeed, this is a sophisticated problem. Indeed, the xsi:schemaLocation-attribute, according to the xsd-specification may occur in every instance document. Therefore it is not necessary to describe it in the schema. Indeed, the xsd specification explicitly forbids to have this attribute specified in your schema.
    Hence, there is no way to specify in a XSD file that a receiver <b>expects</b> the occurance of this attribute. As the graphical mapping tool of XI totally relies on XSD there is currently no easy way to tell the mapping-tool that it has to produce this attribute.
    In a first glance I would view it as an inappropriate restriction from a receiver that it forces the sender to send this attribute. As XSD does not provide a possibility to specify this restriction it, in my opionion, contradicts the sence of XSD to require it.
    Anyway, if there is no other way, you may manually extend the XSD such that it contains the reference to that attribute. Formally the result would be no correct XSD anymore, as the XSD specification prohibty to model this special attribute. However, this restriction is currently not checked by XI. Hence, you could upload this file as External Definition anyway. Then the mapping-tool could be forced to produce that attribute.
    Note, that the mapping-tool might use another namespace prefix for the namespace "http://www.w3.org/2001/XMLSchema-instance" (not necessarily xsi). But, as I have indicated in this forum once and again, the string used as namespace prefix should not matter.
    Anyway, this is a workaround, and it probably requires some knowledge on XSD to perform it. Thus, the preferable solution would be to convinve the receiver, not to require that attribute.

  • Linking Lightbox to an image, is it possible?

    Hi,
    Currently I am working on a project where I have cropped an image in Photoshop, and would like to make this an active link that when clicked will open up the whole image in a lightbox style display window.
    Is this possible in Adobe Muse?
    I have been trying to find a solution to this problem, and have come across sites such as: Click to Zoom for Photos: Adding the Lightbox Effect - DWUser.com Education Center
    however this will only load up the image in the window, not a different version of the image.
    The main reason for a lightbox style presentation is that it is for my Photoshop and Photography portfolio, and would like to achieve a nice looking display piece, rather than clicking on an image and loading up another tab.
    If it is possible, or if anyone has any other solutions/suggests I would greatly appreciate the helping had.
    Cheers all
    Chris
    (digitalkuta)

    Hi Chris,
    Lightbox Display in Widgets Library > Compositions section is the widget for you.
    It gives you the opportunity to individually set the content of the trigger (thumbnail) and target (lightbox image) rather than using the scaled down version of target image as thumbnail.
    Let me know how that goes for you and if you need any further help.
    Cheers,
    Vikas

  • Pop-up images...possible?

    I've been scouring this message board for a while now and still haven't figured out how to create pop-up images.  It appears that it may be possible, but I couldn't figure out how.
    Is it possible to create a button that will pop-up an image when pressed?  I know that you can use the messageBox method to create a popup message, but is there any way to creat a popup that only shows a graphic?
    Any help would be much appreciated.
    Thanks!

    Are you talking about something like this -
    http://boxover.swazz.org
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Mickey Sewell" <[email protected]> wrote in
    message
    news:g5grav$3lr$[email protected]..
    >I am a new use to Dreamweaver. Is it possible to have
    pop-up images and
    >text
    > similar to that used in RoboHelp? Also, is there an
    expanding text
    > capability
    > or is the Spry Collapsible widget the only way to do
    that?
    > I haven't been able to find any tutorials about stuff
    like that.....
    > Thanks for any help..
    > Mickey Sewell
    >

Maybe you are looking for

  • Installing photoshop elements 12

    I have tried several times to install this program- i have downloaded both files (.7z & exe) to the same folder. exe has installed, but when i try to start the program i get a log in pop up- which i do log in- then the window disappears and nothing h

  • IMessage will NOT activate, even AFTER complete iPhone restore.. PLEASE HELP!

    For the last couple of days I have had problems with my iMessage playing up. For the last two days however, it's completely stopped working. Previously used to work fine! Actions I have ALREADY undertaken to try and fix iMessage always resorting in s

  • Error in MAT View Creation

    I am getting an error in creating a mat view. SQL> CREATE MATERIALIZED VIEW 2 MV1 3 as 4 select integration_id 5 from sbolap.w_org_d; from zeus.w_org_d ERROR at line 5: ORA-00942: table or view does not exist Here the zeus is the schema i am accessin

  • Query needed Urgently

    Dear Experts, I need to query the dba_mview to find the compilation errors. Could you please give me the query.....

  • After I upgraded to OS x 10.7.5 my Mail account does not post mail, how come?

    After I upgraded to OS x 10.7.5 my Mail account does not post mail, how come?