Icon/Image display
Hello!
This is my code, and my problem is that I put 2 images to the same place, the second picture is smaller than the first but if I put the second I can't see the first... How can I solve this problem? I want to see each image in same time. Can this be solved with swing? And if yes, can you guys show a little code of how? And sorry for my bad english...
package kep;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.net.URL;
import javax.imageio.ImageIO;
import javax.swing.*;
public class kep {
private JScrollPane getContent(BufferedImage image) {
ImageIcon icon = new ImageIcon(image);
JLabel label = new JLabel(icon);
label.setHorizontalAlignment(JLabel.CENTER);
return new JScrollPane(label);
public static void main(String[] args) throws IOException {
String path1 = "100.png";
String path2 = "1016.png";
URL url1 = kep.class.getResource(path1);
URL url2 = kep.class.getResource(path2);
BufferedImage image1 = ImageIO.read(url1);
BufferedImage image2 = ImageIO.read(url2);
JFrame f = new JFrame();
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setContentPane(new kep().getContent(image1));
f.setContentPane(new kep().getContent(image2));
f.setSize(400,400);
f.setLocation(200,200);
f.setVisible(true);
}
You are trying to set the content pane to two different things when it can only have one. If you want the images overlapping, draw one on top of the other:
public static void main(String[] args) throws IOException {
String path1 = "100.png";
String path2 = "1016.png";
URL url1 = kep.class.getResource(path1);
URL url2 = kep.class.getResource(path2);
BufferedImage image1 = ImageIO.read(url1);
BufferedImage image2 = ImageIO.read(url2);
Graphics imageG = image1.getGraphics();
imageG.drawImage(image2, 0, 0, this);
imageG.dispose();
JFrame f = new JFrame();
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setContentPane(new kep().getContent(image1));
//f.setContentPane(new kep().getContent(image2));
f.setSize(400,400);
f.setLocation(200,200);
f.setVisible(true);
}
Similar Messages
-
Iconic images on multirow buttons
Hi,
I am trying to get different iconic images displayed on a button in a multirow block. Is there any easy way to do it. Running Forms 10g
example
I have a block based on customer orders which displays 10 rows
I want to display an iconic image on a button in the multirow that shows a different image depending on the status of the order e.g. ordered, dispatched, cancelled etc etc
so row 1 would show image1, row2 image 2, row3 image 1 and so on, each row could be a different image or the same image
As I scroll up and down records refreshing the data displayed in the multi row I would want the images to change as well
Tried set_item_property (icon_filename) but this sets all instances of the button to the same image, set_item_instance_property cannot set the Icon Filename.
Can this be done in javabean?, can you reference the individual row instance's of the javabean.
Any possible solutions?
ThanksI have also tried to "simulate" this using an image-item, but the image doesn't populate. I put the code for read_image_file in post-query trigger thinking this would be most appropriate.
Even when I put it in a When-New-Record-Instance as I scroll up and down the records in the block the images clear and don't refresh as expected -
Displaying Icons/Images in TextBoxes
I'm searching for a TextBox Class which can display Icons / Images as well. This is possible with the JTextPane, but it's not possible to copy/paste icons. Is there an improvement of this class or a better solution available?
http://blogs.adobe.com/aharui/2007/04/icons_in_combobox.html
This didn't work for you?
- Jason -
Icon images not displayed on canvas in form developer
It seems I've got the opposite problem from all the postings regarding icons. I've read the white paper: "How To Deploy Icons" and tried both "documentbase" and "codebase" settings, and icons are displayed fine in both cases when I preview (run the form from Form Developer), but I cannot see the gif images on canvas in Forms Developer, whatever setting I choose.
I'm running DS 9.0.4 and the only specific thing is that my startup shortcut on my XME desktop is starting in a directory where we store our *.fmb *.fmx files (W:\ScreenDevelopement\... which is not default directory - when you run from Start -> Programs menu).
It is not a big deal (I guess I can live without having images on canvas), but I don't understand why something that should be fairly simple to setup is such a pain.
Thanks,
A.M.No part of the picture is visible on canvas in Forms Developer, and neither UI_ICONS nor UI_ICON_EXTENSION is helping. It looks like Forms Developer is totally disconnected from the rest of the DS (run time), and cannot figure out where to look for the pictures. As I mentioned earlier, when I run the screen preview the pictures are visible.
A.M. -
How to set folder icon image in OS X Lion?
I set my folder's icon image in OS X Leopard before, but I don't know how to do that in Lion. In Leopard you simply copy the icon image from an Info window of a file, and paste that into the folder's icon image in the top left corner of its Info window. In Lion I don't see the icon of the file in its Info window as a preview, but rather I see only a generic JPG file icon. Any ideas?
Can you explain why there was no thumbnail for that file?
The OS does not create or add thumbnails, previews, nor custom icons to images or other files. Although it displays files with what appears to be a custom icon, it is not part of the file itself; it is created on the fly, just for display. Since it is not part of the file, it does not appear in the Get Info window.
Back in OS 9 days when you downloaded an image file from the web, either via drag and drop or via the download mechanism, the image file would typically be placed on the drive as a QuickTime image with both a custom icon and a preview image added to it.
I skipped earlier versions of OS X, and started with Snow Leopard, so don't know about earlier versions of OS X. Apparently the auto creation and addition of a custom icon and preview have been dropped in later versions in favor of using Preview to generate a temporary (for display only) custom icon on the fly. One result of this is that image file sizes are kept reasonably small - adding a suite of custom icons and a preview image to the file itself increases the file size a lot; it's not unusual for those additions to double the file size, or more. -
Icon not displaying in dynpro table
Greetings,
I am currently having an issue displaying icons within a table on a classic dynpro screen. In debugging the program I see that the icon image is loading to the table structure correctly. However, when the information is displayed on the screen the icon is missing and the code for the icon is being displayed instead. Is there some setting or FM that I need to call to get the icon image to display? For example, the icon icon_display_text is being displayed on the screen as @0P@ instead of the image. Has anyone run into this or successfully used icons in the line items of a table?
Thanks,
JeremePlease check example transaction SM35 you can find similar code in screen 1010 under module init_subscreen.
loop at itab_apqi.
case itab_apqi-qstate.
when ' '.
call function 'ICON_CREATE'
exporting
name = icon_create
info = 'neu'(036)
importing
result = itab_apqi-status
exceptions
others = 1.
endclase.
endloop.
a® -
Why won't raw images display as thumbnails in organiser?
My raw images display only as the 'egg timer' icons in Organiser. I can open them individually, edit and save as jpeg but cannot view them on the grid either before or after editing. This has only just started happening - two weeks ago all was well. It's such a nuisance not being able to scroll down my images in order to decide which ones to edit.
Here's what I've tried:
Uninstalled Elements 12 and reinstalled
Checked for updates (all up to date)
Updated thumbnails
Usually what happens after my images are imported is that I see these icons and they gradually open to reveal my raw images. Now they just stay with the timer icon and nothing more happens.
Anyone help me before I tear out any more hair? Thank you!If you can use the 'update thumbnail' successfully on individual files and open those files in ACR correctly chances are that you are facing a computer power problem. Creating a thumbnail in the Organizer means opening the image to create a reduced version. For raw files, that means reading the raw file (32 GB each for my Fuji raws...), converting it using the last settings in the xmp sidecar files, then creating the reduced thumbnail. Several seconds, even with a decent computer.
To get an idea of your problem, it would be good to know the type and size of your raw files and your computer specs.
Contrary to other viewing softwares which only show the embedded jpeg thumbnail in the raw file, the organizer shows a real preview.
Photoshop Elements (PSE) knowledge base.: How to correct hourglass (generic) thumbnail in Elements Organizer?? -
I am getting problem in displaying icons in the toolbar.
Before posting here, i have gone through all the threads related to it, but could not get my problem fixed.
Following steps have been followed:
1- created jar file of the GIF images i.e. my.jar. All the images were in the root directory.
2- Copied the jar file to G:\DevSuiteHome\forms\java directory.
3- In the form, in the property of menu item, i specified the exactly same image file name with no extension.
4- Modified the formsweb.cfg file with following changes:
archive_jini=f90all_jini.jar,my.jar
imagebase=codebase
i can access the jar file in the browser using the following url:
http://<servername>:8891/forms/java/my.jar
The platform is Windows 2003 with Developer suit 10g.
Kindly help me to fix this problem.
ThanksWithout changing any configuration, however, when i execute the application by entering the following command into the start->run menu
iexplore http://ssi-mmunir.ssilhr.com.pk:8891/forms/frmservlethttp://ssi-mmunir.ssilhr.com.pk:8891/forms/frmservlet?config=summit
then application successfully display the icons in the toolbar.
But when it is executed from form builder, no icons are displayed. -
Custom Icon Images for Folders in KM
Hello Everyody,
I have to display folders such as Pesonal Documents, Public documents, Recently used, Favourites etc which are there in the entry point repository in KM. Right now all these folders are being displayed with the default icon image specified. I want to replace these default images with custom images but couldnt see any property where i can change the image path for these folders. I checked the details of all these folders and even went through the properties but there it shows only the default image name speciefied for that folder and no active settings where i can change the image path for custom icon. Kindly suggest how to implement custom image for KM folder icons.
Thanking you all in advance,
Regards,
Sarabjeet.Hi,
If I understood, you have a KM navigation iview, where some folders apperar. You want to change the icon for each of them differently.
For this do the following:
First have a look into the KM.navigation iview and get the layout set property. Go to System config->KM->Content management->User interface->Settings->LayoutSet and find the layout set you are using. Go to appropriate resource renderer and check the "<b>Icon setting</b>". Change it to: <b>iconreplace</b>.
Now get the KM details for your folders and change the <b>IconSource</b> property to your image Example:
/etc/public/mimes/images/add.gif
Voila...the icons for these folders are changed!
Hope this is your case.
Romano -
Icons not displaying in web pages
navigation icons are displayed as blank containing a 4bit code. I have a screen save example.
Hello,
'''Try Firefox Safe Mode''' to see if the problem goes away. [[Troubleshoot Firefox issues using Safe Mode|Firefox Safe Mode]] is a troubleshooting mode that turns off some settings, disables most add-ons (extensions and themes).
If Firefox is open, you can restart in Firefox Safe Mode from the Help menu:
*In Firefox 29.0 and above, click the menu button [[Image:New Fx Menu]], click Help [[Image:Help-29]] and select ''Restart with Add-ons Disabled''.
*In previous Firefox versions, click on the Firefox button at the top left of the Firefox window and click on ''Help'' (or click on ''Help'' in the Menu bar, if you don't have a Firefox button) then click on ''Restart with Add-ons Disabled''.
If Firefox is not running, you can start Firefox in Safe Mode as follows:
* On Windows: Hold the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
* On Mac: Hold the '''option''' key while starting Firefox.
* On Linux: Quit Firefox, go to your Terminal and run ''firefox -safe-mode'' <br>(you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
When the Firefox Safe Mode window appears, select "Start in Safe Mode".<br>
[[Image:Safe Mode Fx 15 - Win]]
'''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]] article to find the cause.
''To exit Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
When you figure out what's causing your issues, please let us know. It might help others with the same problem. -
Icons not displaying in oracle forms.
Hi All,
I am trying to display icons on Oracle forms 10g.I just brought over these forms from another system and I am trying to display the icons like next record, clear form etc..
I have done the following steps so far. The icons are still not displaying. Appreciate any help.
Created a folder in D:\oracle\oracleas\forms\java called icons.
Copied all gif files and jpeg files into icons. Then created a jar file.
D:\oracle\oracleas\forms\java>jar -cvf my_icons.jar icons
It created the jar file in the same directory D:\oracle\oracleas\forms\java
Also changes were made to these files as shown below each file.
forms.conf
AliasMatch ^/forms/icons/(..*) "D:\oracle\oracleas\forms\java\icons/$1"
registry.dat
default.icons.iconpath=http://servername:7778/forms/java/
formweb.cfg
# Forms applet parameter
codebase=/forms/java
# Forms applet parameter
imageBase=codebase
# Forms applet archive setting for JInitiator
archive_jini=frmall_jinit.jar,frmmain.jar, frmjdapi.jar, my_icons.jar
# Forms applet archive setting for other clients (Sun Java Plugin, Appletviewer, etc)
archive=frmall.jar,frmmain.jar, frmjdapi.jar, my_icons.jar
Also added this line under orion-web-app in orion-web.xml file.
<virtual-directory virtual-path="/icons" real-path="D:\oracle\oracleas\forms\java\icons" />
Restarted the OC4J forms server after any change.To test your configuration, you can try building an URL:
i.e.
http://localhost:8889/forms/frmservlet/icons/iconname.gif
Does it show the icon ?
If that does not work, I would try re-generating the my_icons.jar file, but instead of going directly to the forms/java/icons folder, copy the icons folder to the root directory i.e. c:\icons and execute the command to jar the icons folder, then redeploy the my_icons.jar file.
Then try again with the URL... if the URL does not work, you still have configuration issues.
PS: Don't forget to clear the cache in your browser so that the new .jar files is loaded?
Furthermore:
========
Remove the changes made to the forms.conf and orion-web.xml, they are only needed if the icons are
not stored in a .jar file.
forms.conf
AliasMatch ^/forms/icons/(..*) "D:\oracle\oracleas\forms\java\icons/$1"
orion-web.xml
<virtual-directory virtual-path="/icons" real-path="D:\oracle\oracleas\forms\java\icons" />
Edited by: Rodolfo Ferrari on Jun 17, 2009 6:14 PM
To double check your configuration, follow steps in metalink note 232413.1 - How to Deploy Iconic Images via a JAR File in Forms 9i/10g?.
Edited by: Rodolfo Ferrari on Jun 17, 2009 7:19 PM
Edited by: Rodolfo Ferrari on Jun 17, 2009 7:24 PM -
Full screen caller image display
Full Screen Caller image was one of the best feature of an iPhone that made look iPhone simpler and fantastic to use..
This particular feature seems to have been last with the upgrade to iOS 7.1..
Please fix this issue..
Full screen caller image display makes the phone look beautiful and wonderful when a known person is callingI agree with you on the full screen view for when a users contacts call them. I hesitated upgrading, Apple has now joined the ranks for screw-ups! Since the late Steve Jobs left this earth, Tim Cook has royally screwed-up this company! Customers here in th U.S and arouund the world are the ones shelling out hundreds of dollars for a product that is the best next thing to revoluntionize the way we communicate with others. But it seems that $600+ dollars gets us junk and a device not tailored to us, the users. I want to call them "M!cr0$oft Apples!" Give us the ability to go back to iOS6. Let us choose! We the customers have made this company rich, full of wealth beyond their greedy little hands. Give us the ability to choose what OS we want to install. Their should be a transparency relationship between the customer with the money, and worker who will work for us to render a product that we "the users," want" and not want a senior desinger assumes we think is good. Remember, this is all thanks to a legend who we all know and respect as ("in my own opinion), the father of modern communication Steve Jobs. SJ worked till his last days here to creat a masterpiece, T.C came on board and took a huge "memoryDUMP," and disregarded his visions. If your passionate like me about Apple and what Steve Jobs stood for, then help me create a petition to make this company see that we "The customers are ALWAYS right!"
Missing and need back:
Transparency on the dock and icons
Working Wifi, and imessage
Better Battery life!!!
Reverse the icons back to iOS7.06
Fix maps
Unless the designers are gothic in nature (I love Goth!!); dont make our phone dark and heavy on the fonts.
I dont know about you, but I' am tired of hearing excuses from Apple and its CEO!
PRETTY MUCH, REVERSE THE UPDATE OR WE WANT OUR MONEY BACK!
As th general public alredy knows, Apple will never listen or read these suggestions" They sleep soundly in thier 2.5millon homes, and respectively. Why care about those people that are paying thier salary pretty much! Listen up board of directors.....Fire Tim Cook, Hire a go-getter, Micromanage manic that will continue Mr. Jobs legacy and nip this disaster in the bud! Tweet this, FB this! Let make the world realize we will not take it anymore! Fix the dam problems! -
"Icon image formats used for iconic buttons can be .ico files at design time, but must be GIF or JPEG format at runtime. There is no other restriction of this related to deployment."
Read the above statement in an STS test paper and was wondering this is true. How does it work is it that the .ico are automatically converted at runtime or do the other extensions need to exist at runtime.
Incidentially does anyone know if there is a good source for forms icon files hiding out on Oracle.com
ThanksWebForms usually do not show the icons at design time, but with little configuration we can display them, and since webforms will only show only GIF and PNG files (no JPEG) the design time icons are a bit fuzzy, so you can use .ico files for design time and .gif or .png for runtime.
You must have two sets of icons if you want to view the icons at design time.
You might also want to read [url http://www.oracle.com/technology/products/forms/pdf/webicons.pdf]Deploying icons in WebForms
Tony -
How to set Image display palette while running
I can see the palette type in property of image display reference...but i cant find any method to set it.
(The problem is that, in Labview right click on image open a menu with palette selection visible. But in EXE apllication there is no extended menu. so i want to change the paltte through control button)
Tnx for help
HaDHello HaD,
The image control is installed with either the Vision Development Module or the NI-IMAQ driver, and is not a standard component found in LabVIEW. If you have questions about the image display control or vision functions it would be better to post in the Machine Vision forum:
http://forums.ni.com/ni/board?board.id=200
In regards to your question, this menu is not available as a runtime property, and therefore the user of program will not be able to set it directly through the control. Instead, you will need to allow the user to set it programmatically in LabVIEW by use of a property node.
To create this property node, right-click on the image display icon on your program's block diagram, and select:
Create » Property Node » Palette » Palette Type.
You will then be able to change the value of this property by right-clicking on the property node icon and selecting "Change All To Write". To create a control on the front panel that the user change at runtime, right-click on the “Palette Type” input, select:
Create » Control
If you have any questions about the application architecture required to implement this design, please continue to post in the LabVIEW forum.
I hope this helps.
Best regards,
Jasper -
Lightroom permanent crash - no images displayed whatsoever
Hi all,
I use the 64-bit Lightroom 2.0 on a Vista Business machine. Today, I was importing some images and since the import finished I cannot get any images in my library to display. There are simply blank panels where images should be (in all modules, in import screen, everywhere). The panels display all the relevant icons, tags and stuff, but there is absolutely no image displayed.
I have tried the following:
- repair reinstall
- uninstall + reinstall
- delete settings file
- create new catalog
- optimize catalog
None of the above changes anything. The only thing I have not tried is rebooting after uninstalling and then reinstalling Lightroom.
I have not found any relevant information to this particulary nasty problem, not on Google and here on these forums. Can anybody help me restore the functionality of Lightroom? Has anybody ever even encountered this problem?
Thanks!As indicated in post #3, I already tried that. The previews are reconstructed (I can even observe the panels changing as previews are built) and the previews folder does contain valid files (the files contain image data that can be opened with an image browser).
I have now also tried:
- running in Admin mode
- upgrading to 2.3RC
- uninstalling and reinstalling
- uninstalling and killing all relevant entries in the Registry and then reinstalling
- using a catalog made on 1.2 and converting it to 2.x
Nothing works.
UPDATE: OK NOW I GOT IT! It was the color profile! I used the Vista Color Management thing, killed all profiles and used some default sRGB profile and restarted Lightroom. It started working right away. Apparently my custom profiles made with a Spyder were somehow erased and lost. A big thanks goes to Kenneth Daves and all you guys for helping me out.
I had it at the back of my mind to try the profiles too. Since no reinstall helped I did foresee the possibility that something else on the system went bust. I couldn't do a System Restore (too many re-installs, used up all my restore points), so I was going to try first the color management thing and then some installing in safe mode (to perhaps kill any locks on DLL files that might be faulty). I would have also tried installing v1.2, but it would probably behave in the same manner.
Thanks again guys!
Maybe you are looking for
-
I am unable to remove a video from my iPhone when I sync it using iTunes. The video is unchecked in iTunes and I have even gone so far as to delete it from my iTunes library.
-
Can no longer send emails from Mail on iMac but CAN on MBP
Initially, when Mobile Me ended, my email was changed to work with iCloud and it worked fine for about seven months or so. Then, it started giving me an error message (on my iMac, my Macbook Pro, and my iPhone) that said it rejected my password. Aft
-
i have run the adobe cleaner , repaired disk permission and also tried to download and install several times. this is a mac osx running the yoshmite please help this is the error Exit Code: 39 Please see specific errors below for troubleshooting. For
-
Unable to use ethernet after updating to OS X 10.10.2
I updated my Mac Mini (late 2012) yesterday from OS X 10.10.1 to OS X 10.10.2. After I updated, I noticed that under Networks in System Preferences, OS X indicated that I had a cable unplugged for my ethernet connection. I checked the cable and even
-
Suggestion for future Match upgrade -- add a "force upload" function
I've been using the Match service since it went GA, last month. I have a lot of CD rips, but also some vinyl needledrops and different masterings (i.e. The Beatles in Mono) which the Match functionality really has trouble with. In the case of th