HELP! how to display an image when clicking on JLabel?
hi. new to the forums. anyway, i need help in displaying an image.
what i'm trying to do is when clicking on a JLabel using mouseClicked, an image will show and when the image is clicked it will disappear. i've searched and searched and have not found anything useful. thanks...
thanks.
searched on the setIcon, didn't find anything. btw, i know how to set the icon on the JLabel. i'm trying to figure out how i can get it that when i click on the JLabel by using the mouseClicked (or maybe even mousePressed) listener, the image pops up and when i click on the image, it closes or disappears.
btw, i'm using the netBeans GUI builder for this. thanks again.
Similar Messages
-
How to open an image when clicking in a word.
Im working in a demo for an interactive book for ipad using the Digital Publishing Suite > Folio Builder and i need to be able to open a specific image when clicking in a word. I havent found any tutorial that shows how to do this can somebody please point me in that right direction? thx so much
Download Bob Bringhurst's DPS Tips app from the app store and/or watch my lynda.com DPS Essentials Course. If you don't have a subscription you can get a free one week trial here: lynda.com library | Trial Subscription
-
How to display an Image which is on Panel behind JScrollPane - Please Help
Hiii All,
How to display an Image which is on Panel behind JScrollPane. I have set the setOpaque() method of JScrollPane to false still when i run the program the JScrollPane is set as Opaque.. Can some one please help me in this...
Thanks,
Piushyou need to set both
scrollPane.setOpaque(false);
scrollPane.getViewport().setOpaque(false); -
Help- how do I make images ready for web gallery??
Hi,
I am trying to create a photo gallery of images within Bridge using the Adobe Web Gallery feature. I have the images I want to use in a folder.What steps do I need to take to get the images saved in the correct format and file size? Also, what files sizes do you recommend for a web gallery? I need to make medium to large thumbnails & large images (when clicked). Here's what I am thinking I need in terms of getting this right:
use Adobe Photoshop/Bridge to create the gallery
jpg for photos
gif for solid colors
file size under 2MB (full image), under 20-30K for (thumbnails), total size of all images under 50K (no more than 50 sec. to download)
screen size: 984x728
screen resolution: 72dpi
If you could help me in any way, shape or form concerning making my images ready for a web gallery that would be most helpful. And if you can refer me to any resources on making a web gallery that'd be awesome. Thank you!
ashmic19Thanks for the link Curt Y that video is really helpful. After looking through some materials I had I figured out how to optimize my images. So I don't need any help anymore. But thanks to all who viewed this and thanks Curt Y for the video!
ashmic19 -
How to display a image in webdynpro view using a bytearry
Hi Frndz..
How to display an image in a view using webdynpro java ..i have bytearry object in context ..like
*byte[] img = wdContext.nodeYywwwdataImport_Input().nodeOutput().nodeOutMime().currentOutMimeElement().getLine();*_
by using this i need to show image in view..
Kindly help me ....
Thankas in Advance
Regards
RajeshHi,
byte[] img = wdContext.nodeYywwwdata_Import_Input().nodeOutput().nodeOutMime().currentOutMimeElement().getLine();
use this code to create resource and you need to set this value to the context created to display the image suppose in the image UI and set the source property with this attribute:-
IWDResource res=WDResourceFactory.createCachedResource(b,"MyImage",WDWebResourceType.JPG_IMAGE);
IPrivateAppView.IVn_ImageTabElement imageEle=wdContext.createVn_ImageTabElement();
imageEle .setVa_Name(res.toString());
wdContext.nodeVn_ImageTab().addElement(imageEle);
Hope this may help you.
Deepak -
How to Display an Image on my FORM
Good Day!
I would like to ask some help from you guys with my problem on how to display an image on my form. I would like to display my uploaded image on my form but instead of an image, the get_blob_file is showing. By the way, I'm using Apex 4.1
I downloaded the Order Entry Sample Application and followed the Page 6, the Product Details. I even made snapshots of each details from Page Rendering to Page Processing in order not to miss a thing.
At the moment, I was able to upload or store the image on my created Oracle table and also able to retrieve it on the Download Link Text with Content Disposition value of Inline, provided by APEX Settings. If I invoke the Download link beside the file browser, a page with the image will be shown, below is the address:
http://127.0.0.1:8080/apex/apex_util.get_blob_file?a=200&s=339877802936975&p=230&d=7107921433296839&i=7107601420296838&p_pk1=54&p_pk2=&p_ck=7D6512D967336C4B94258EEA3CDF1BE6&p_content_disposition=inline
However, instead of showing the image on a region, below is the one showing on my Form:
<img src="apex_util.get_blob_file?a=200&s=339877802936975&p=230&d=7107921433296839&i=7107601420296838&p_pk1=54&p_pk2=&p_ck=7D6512D967336C4B94258EEA3CDF1BE6" />
As you can see the parameter values are the same but I know I missed something that's why I'm here :)
I would highly appreciate all the help you can provide and many thanks in advance.
I tried to change gear by making an html region of type PL/SQL (anonymous block) and a procedure but still no image :(
Below are the scripts.
declare
cursor cur is
select *
from wsemployee
where empid = :P230_EMPID;
begin
for rec in cur
loop
IF rec.mime_type is not null or rec.mime_type != '' THEN
htp.p( '<img src="my_image_display?p_image_id='||NVL(rec.empid,0)||'" height="'||100||'"/>' );
else
htp.p( 'No Image ');
END IF;
htp.p( ' ');
end loop;
end;
PROCEDURE
create or replace PROCEDURE my_image_display( p_image_id IN NUMBER)
AS
l_mime VARCHAR2 (255);
l_length NUMBER;
l_file_name VARCHAR2 (2000);
lob_loc BLOB;
BEGIN
SELECT MIME_TYPE, PHOTO_BLOB_CONTENT, PHOTO_FILENAME,DBMS_LOB.GETLENGTH(photo_blob_content)
INTO l_mime,lob_loc,l_file_name,l_length
FROM wsemployee
WHERE empid = p_image_id;
-- set up HTTP header
-- use an NVL around the mime type and
-- if it is a null set it to application/octect
-- application/octect may launch a download window from windows
owa_util.mime_header( nvl(l_mime,'application/octet'), FALSE );
-- set the size so the browser knows how much to download
htp.p('Content-length: ' || l_length);
-- the filename will be used by the browser if the users does a save as
htp.p('Content-Disposition: attachment; filename="'||replace(replace(substr(l_file_name,instr(l_file_name,'/')+1),chr(10),null),chr(13),null)|| '"');
-- close the headers
owa_util.http_header_close;
-- download the BLOB
wpg_docload.download_file( Lob_loc );
END my_image_display;
Edited by: user13831927 on Dec 22, 2012 3:24 PMHi Ying,
you can add a UDF to the table spp2 with a programm
but the table is not yet listed in the 'Manage User Fields' form.
there's no way to "enable" it - sorry -
How to display the image which in KM folder using url iview
Hi Friends
How to display the image, which is under KM folder structur using the url iview.
i trying using url iview url as \document\testfolder\abc.jpg as url for the iview.
but its now working .. so please help me how to slove this problem
If is not the correct way then please suggest me best way to achive this.
Thanks
MukeshHi Mukesh,
I think this may work,
1, Create a HTML Layout.
You can put your image wherever u want with HTML Codes.
Check this, [Article|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3915a890-0201-0010-4981-ad7b18146f81] & [Help|http://help.sap.com/saphelp_nw04/helpdata/en/cc/00c93e9b2c3d67e10000000a114084/frameset.htm]
With this, u can use the standard KM commands also.
2, U need to use KM Navigation iView for this rather than KM Doc iView.
3, In the Nav iView, u can use &rndLayoutSet=nameOfUrHTMLLayout to force the view with this new layout.
Regards
BP -
How to aggregate the measue when click '∑' ?
Hi Experts,
How to aggregate the measue when click '∑' ?
For example:
In table view.
A-----------A1-----------2
A-----------A2-----------3
ATotal-------------------5
B-----------B1-----------2
B-----------B2-----------3
BTotal-------------------5
GrTotal------------------10(It is not my expected result.)
However, GrTotal is not my expect result, the correct result is 5 , not 10. How to implement my requrement? Thanks.Hi,
If you want the result to be the average of your sub-totals (?) then I think the only way you can do is is by using a union query to give the 'illusion' of a grand-total.
Using this mechanism you can create a grand-total using whatever logic you wish, you then just combine the result and with cunning use of headings / formatting make it look exactly like a standard functionality total.
Helpful?
regards,
Robert. -
How to display an image, which is stored in a database?
Hi All,
I would like to display an image with Web Dynpro.
I already know how to display an image which is stored in the path src/mimes/Components/...
But does anybody knows, how to display an image which is stored in a database (e.g. MaxDB)as a datatype of binary?
Thanks in advance!
Regards,
SilviaHallo John,
yes, you can use the Image UI element.
Further you have to create a String for the URL. Implement like as follows:
IWDCachedWebResource cachedResource = null;
String imgUrl = null;
WDAttributeInfo attInfo = wdContext.getNodeInfo().getAttribute(IPrivateXYView.IXYElement.PIC_DB);
IWDModifiableBinaryType binaryType =
(IWDModifiableBinaryType) attInfo.getModifiableSimpleType();
binaryType.setMimeType(WDWebResourceType.JPG_IMAGE);//Example *.jpg
WDWebResourceType type = binaryType.getMimeType();
byte[] file = wdContext.currentXYElement().getPicDB();
if (file != null)
cachedResource = WDWebResource.getWebResource(file, type);
try
imgUrl = cachedResource.getURL();
catch (WDURLException e)
IWDMessageManager msgMgr = wdComponentAPI.getMessageManager();
msgMgr.reportException(e.getLocalizedMessage(), true);
I hope it will help you.
Regards,
Silvia -
How to display list process, when i run sql*loader in c#
Hello,
How to display list process, when i run sql*loader in c#. I mean when i run sql*loader from cmd windows, i get list process how many row has been inserted. But when i run SQL*Loader from C#, i can't get process SQL*Loader.
This is my code:
string strCmd, strSQLLoader;
string strLoaderFile = "XLLOAD.CTL";
string strLogFile = "XLLOAD_LOG.LOG";
string strCSVPath = @"E:\APT\WorkingFolder\WorkingFolder\sqlloader\sqlloader\bin\Debug\8testskrip_HTTP.csv";
string options = "OPTIONS (SKIP=1, DIRECT=TRUE, ROWS=1000000,BINDSIZE=512000)";
string append = "APPEND INTO TABLE XL_XDR FIELDS TERMINATED BY ','";
string table = "OPTIONALLY ENCLOSED BY '\"' TRAILING NULLCOLS (xdr_id,xdr_type,session_start_time,session_end_time,session_last_update_time,session_flag,version,connection_row_count,error_code,method,host_len,host,url_len,url,connection_start_time,connection_last_update_time,connection_flag,connection_id,total_event_count,tunnel_pair_id,responsiveness_type,client_port,payload_type,virtual_type,vid_client,vid_server,client_addr,server_addr,client_tunnel_addr,server_tunnel_addr,error_code_2,ipid,c2s_pkts,c2s_octets,s2c_pkts,s2c_octets,num_succ_trans,connect_time,total_resp,timeouts,retries,rai,tcp_syns,tcp_syn_acks,tcp_syn_resets,tcp_syn_fins,event_type,flags,time_stamp,event_id,event_code)";
strCmd = "sqlldr xl/secreat@o11g control=" + strLoaderFile + " LOG=" + strLogFile;
System.IO.DirectoryInfo di;
try
System.Diagnostics.ProcessStartInfo cmdProcessInfo = new System.Diagnostics.ProcessStartInfo("cmd.exe");
di = new DirectoryInfo(strCSVPath);
strSQLLoader = "";
strSQLLoader += "LOAD DATA INFILE '" + strCSVPath.ToString().Trim() + "' " + append + " " + table;
StreamWriter writer = new StreamWriter(strLoaderFile);
writer.WriteLine(strSQLLoader);
writer.Flush();
writer.Close();
// Redirect both streams so we can write/read them.
cmdProcessInfo.RedirectStandardInput = true;
cmdProcessInfo.RedirectStandardOutput = true;
cmdProcessInfo.UseShellExecute = false;
cmdProcessInfo.LoadUserProfile = true;
//System.Diagnostics.Process.Start("CMD.exe", strCmdLine);
// Start the procses.
System.Diagnostics.Process pro = System.Diagnostics.Process.Start(cmdProcessInfo);
// Issue the dir command.
pro.StandardInput.WriteLine(strCmd);
// Exit the application.
pro.StandardInput.WriteLine("exit");
//Process[] processlist = Process.GetProcesses();
//foreach(Process pro in processlist){
Console.WriteLine("Process: {0} ID: {1}", pro.ProcessName, pro.Id);
Console.WriteLine(pro.StandardOutput.ReadLine());
// Read all the output generated from it.
string strOutput;
strOutput = pro.StandardOutput.ReadToEnd();
pro.Dispose();
catch (Exception ex)
return;
finally
Thanks.friend
sqlldr is an application residing in the OS. procedure runs in the dbms engine.
you cannot run an os command directly from a procedure or a function or a package .
If you want to do so you need to use either a daemon process created by a PRO*C program
or a JAVA stored procedure to do so.
just refer to previous question forums, you can find the solution. Somebody has already given a solution using
java to run an OS command . check it out
prakash
[email protected] -
How to display an image in an alv grid in each corresponding row?
Hi,
please tell me how to display an image in an alv grid in each corresponding row, like;;
tony 23 newyork <image>
Mkitharyan 63 washington <image>
NOT BY HOTSPOTS/URL.you can put image in each cell you want:
data lo_cmp_usage type ref to if_wd_component_usage.
lo_cmp_usage = wd_this->wd_cpuse_alv( ).
if lo_cmp_usage->has_active_component( ) is initial.
lo_cmp_usage->create_component( ).
endif.
DATA lo_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE .
lo_INTERFACECONTROLLER = wd_this->wd_cpifc_alv( ).
DATA lo_value TYPE ref to cl_salv_wd_config_table.
lo_value = lo_interfacecontroller->get_model( ).
data col type ref to CL_SALV_WD_COLUMN.
col = lo_value->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN( 'IMAGE' ).
data image type ref to cl_salv_wd_uie_image.
CREATE OBJECT image.
image->SET_SOURCE_FIELDNAME( 'IMAGE' ).
COL->SET_CELL_EDITOR( image ). -
How to make it selected when clicked and open popup
Hi,
I 've a form in the parent page with many form elements.
I've 2 radio buttons with values "Yes" and "No". I am opening a modal popup when clicked on "Yes" radio button. The modal popup is opening fine.
But when I click "Yes", it' s not selected. After modal popup is closed, when I return to parent page, the option "Yes" is still not selected.
How to make it selected when clicked and open popup?Perhaps try moving the application to your preferred desktop and then right-click it's dock icon > options > Assign to This Desktop.
-
How to enlarge the image when the mouse is clicked
I want to enlarge the image when the user click the image. How to do it by muse? Thank You!!!
Hi,
When you create a page in Muse called "Home" or "Gallery" or other else, when you export your site as HTML you must have a file called "home.html", "gallery.html" or "other else.html". Remember in what page you putted the Gallery in Muse and edit it with notepad, wordpad or similar and find the code where the gallery is linked (search the name of one of your images, is the best way to find it) and replace the code with something similar like that:
<code>
<a href="images/medidas06.jpg" rel="lightbox[gallery]"><img class="block ImageInclude" id="u3527_img" data-src="images/medidas06.jpg" src="images/blank.gif" alt="" data-width="248" data-height="360"/> </a>
</code>
The path to the JPG files must be ok with your website.
The other steps are well explained by the readme of the lightbox library
Regards -
How to display an image in a Text Area
Hi, I will like to display an image in a textarea that I created. Whereby, I will click on File>>Open>>then select an image from a file or folder. But when I select the image, all I see is a bunch of encrypted stuff. I will really appreciate it if someone out there could give me a hand. Thanks a lot in advance!!
Cheers,
YinxMaybe if you use JEditorPane instead of TextArea, you
could use HTML to embed the image that you open inside
that pane.
Quick question, how do I use HTML to embed the image in the pane? An example will be very helpful! Thanks a lot again in advance!!
Cheers,
Yinx -
Help with XML, display data on swipe/click
Hello.
I am trying to create a moibile app that displays XML data. It's basically a phone book. I want the data to change when swiped. I can get the data in just fine. I can get it to display fine. I am not seeing the correct image first, however. I think it's a problem with my imagenum variable.
Then, I want to change what is displayed when the user clicks/swipes on the screen. How do I do that?
stop();
var nameArray:Array = new Array();
var countryArray:Array = new Array();
var portraitArray:Array = new Array();
var flagArray:Array = new Array();
var jobtitleArray:Array = new Array();
var imageNum:Number=0;
var totalImages:Number;
//Load XML
var XMLURLLoader:URLLoader = new URLLoader();
XMLURLLoader.load(new URLRequest("recbook.xml"));
XMLURLLoader.addEventListener(Event.COMPLETE, processXML);
function processXML(event:Event):void {
var theXMLData:XML = new XML(XMLURLLoader.data);
totalImages=theXMLData.name.length();
for (var i:Number =0; i < totalImages; i++){
//push xml data into the arrays
nameArray.push(theXMLData.name[i]);
countryArray.push(theXMLData.country[i]);
portraitArray.push(theXMLData.portrait[i]);
flagArray.push(theXMLData.flag[i]);
jobtitleArray.push(theXMLData.jobtitle[i]);
//data is processed
loadData();
function loadData():void {
var thisPortrait:String = portraitArray[imageNum];
var thisCountry:String = countryArray[imageNum];
var thisName:String = nameArray[imageNum];
var thisJobtitle:String = jobtitleArray[imageNum];
var thisFlag:String = flagArray[imageNum];
var dataLoader:Loader = new Loader();
dataLoader.load(new URLRequest(portraitArray[imageNum]));
dataLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, dataLoaded);
function dataLoaded(event:Event):void {
//I want to start with image 0 (img1.jpg) and cycle through with a mouse click (finger swipe on iOS)
stage.addEventListener(MouseEvent.CLICK, loadMainImage1);
function loadMainImage1(event:MouseEvent):void {
portraitUILoader.source=thisPortrait;
flagUILoader.source=thisFlag;
selectedName.text=thisName;
selectedCountry.text=thisCountry;
selectedJobtitle.text=thisJobtitle;
//add to imageNum (1);
imageNum++;
if (imageNum < totalImages) {//stopping at img2
trace("imageNum " + imageNum);
trace("image name (thisPortrait) " + thisPortrait);//losing image 4 somewhere
loadData();
trace("Total Images " + totalImages);
//click to move past the home screenI'd like to ditch this. don't know how.
homeScreen_mc.addEventListener(MouseEvent.CLICK, goNext);
function goNext(event:MouseEvent):void
nextFrame();
*/here's the output:
imageNum 1
image name (thisPortrait) images/img1.jpg
imageNum 2
image name (thisPortrait) images/img2.jpg
imageNum 3
image name (thisPortrait) images/img3.jpg
Total Images 4
Total Images 4
Total Images 4
Total Images 4
It starts the display on image 1 (the second in the series img2.jpg)*/Thank you.
That helped. I get the correct images in the output, but not in the display. I also get the following error. Any chance you could help with that?
new output after moving the increment:
imageNum 0
image name (thisPortrait) images/img1.jpg
imageNum 1
image name (thisPortrait) images/img2.jpg
imageNum 2
image name (thisPortrait) images/img3.jpg
imageNum 3
image name (thisPortrait) images/img4.jpg
TypeError: Error #2007: Parameter url must be non-null.
at flash.display::Loader/_load()
at flash.display::Loader/load()
at iOS_fla::MainTimeline/loadData()
at iOS_fla::MainTimeline/loadData()
at iOS_fla::MainTimeline/loadData()
at iOS_fla::MainTimeline/loadData()
at iOS_fla::MainTimeline/loadData()
at iOS_fla::MainTimeline/processXML()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()
Maybe you are looking for
-
I install again iTunes and iCloud, but the message is showes any time that I tray to merge the information from my PC to my iPhone and iPad via iCloud. What do I have to do in other to solve that problem. I need to sync the information betwen my PC a
-
Use of Bind Variable in the Query of view object giving null pointer excep
I am using this code in the backing bean of my page to set the value of the bind variable 'cmdID' in the view object. String AM = "model.UnixCommandsAppMod"; String CF = "UnixCommandsAppModLocal"; ApplicationModule am = Configuration.createRootApplic
-
Since I upgraded to Maverick cannot use Iphoto '11 anymore!
Since I upgraded from Mac OX S Snow Leopard to Maverick OX S 10.9, I cannot use IPhoto '11 and Aperture 3 anymore? Can anyone tell me what the problem could be. I cannot find a way to upgrade these programs as they don't work anymore at all! Can I p
-
How to Use Cisco 3660 or 3745 router for FAx
I want to use Cisco 3660 Router or 3745 Router for Receiving FAX on email. I have NM-2CE1T1-PRI which supports E1 R2 signalling on 3660 and 3745 both. What are the additional hardware requires? Kindly Help.
-
Mail.app crashes at same point, on same day, on two different Macs!
I can't explain this at all. No trouble with email at work today on my work iMac, but I come home, try to check my email on my old G4, running 10.4.11, and BAM! Mail.app crashes while synchronizing with my IMAP servers. So, in frustration, I pull out