How can i set picture as background using JPanel
hello can you kindly tell me how i can set picture as the background of my jpanel instead of using set
setBackground(Color.bule)
you can use a JLayeredPane ; put a JPanel containing a JLabel based on an ImageIcon on the lowest layer of your JLayeredPane
then, use upper layers to add components
edit: another possibility is to override the "paint()" method of your JPanel container, and use drawImage() to paint the picture as a background
Similar Messages
-
How can i set "Createdby" attribute When using Custom JheadStart Security
Hello
We do not use JASS for Authentication , please help us how can i set createtby attributes with jhs.username in application for any entity object?
thanksSee a similar question at History Attributes when using Custom Authentication Type
-
How can I set Office Communicator to use my Outlook settings
dears
i use the business exchange mail from vodafone egypt
in work i can use outlook to see my mails and also office communicator
but here in home i can only use OWA and outlook and i cannot set the Communicator to use my Outlook settings
i also tried to use the same settings that already set on the work but i cannot login to it
so please help me to open it
sorry about my English not good :)Looking to do voice overs? See iMovie '11: Record a voiceover
-
How can I set "SOAPAction" http header using SAAJ
When I send soap request, http header's like below
SOAPAction: ""
But, I'd like to send like this
SOAPAction: "http://tempuri.org/HelloWorld"
How can I that using SAAJ ?
My code is
String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
"<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n" +
" <soap:Body>\n" +
" <HelloWorld xmlns=\"http://tempuri.org/\" />\n" +
" </soap:Body>\n" +
"</soap:Envelope>";
Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new ByteArrayInputStream(xml.getBytes()));
DOMSource domSource = new DOMSource(doc);
SOAPMessage message = MessageFactory.newInstance().createMessage();
message.setProperty(SOAPMessage.CHARACTER_SET_ENCODING, "utf-8");
message.setProperty(SOAPMessage.WRITE_XML_DECLARATION, "true");
message.getSOAPPart().setContent(domSource);
message.writeTo(System.out);
SOAPConnection connection = SOAPConnectionFactory.newInstance().createConnection();
SOAPMessage response = connection.call(message, helloURL);
connection.close();
SOAPBody body = response.getSOAPBody();
if ( body.hasFault() )
SOAPFault newFault = body.getFault();
System.out.println("SoapBody has fault.");
System.out.println("code=" + newFault.getFaultCodeAsName());
System.out.println("message=" + newFault.getFaultString());
System.out.println("actor=" + newFault.getFaultActor());
else
System.out.println("Call Successed.");
System.out.println(body);
}message.getMimeHeaders().addHeader("SOAPAction", "http://tempuri.org/HelloWorld");
-
How can I set the foreground/background color after using CSPickColor()?
Hello all,
Is there any one who has experience on changing foreground or background color using Photoshop Plug-in SDK?
Currently I can get a returned color from CSPickColor(), but have no idea how to use it.
Thanks!You can try a linear-gradient that starts at gray 0% and ends at white <whatever the percentage the thumb is at>.
final Node track = slider.lookup(".track");
slider.valueProperty().addListener(new ChangeListener<Number>() {
public void changed(ObservableValue<? extends Number> ov, Number t, Number t1) {
double pct = (t1.doubleValue()-slider.getMin())/(slider.getMax()-slider.getMin())*100;
track.setStyle("-fx-background-color: linear-gradient(to right, gray, gray " + pct + "%, white" + pct + "%, white);");
});Edited by: dgrieve on Apr 12, 2012 12:19 PM -
How can I set up airport extreme using my existing 11.g router
My existing router (ZyXEL - supplied by Telefonica with my land line) is an 11.g type and does not allow me to use iPad/iPod in certain areas of my home. Yesterday I bought an Airport Extreme and was told that I could either connect my existing router's ADSL line directly into the Extreme and connect to my Mac and other peripherals using USB or ethernet cable, or connect from the existing router.
I tried each method using Airport Utility in each case and also trying the different options offered in the set-up. It doesn't seem to want to work.
Can anyone help me please.Further to my earlier (and first) posting, I have been playing with the airport extreme and it now works via my existing router but, it's range is less than 15 metres and that is no better than my existing 11.g router.
Does anyone know how I can increase this range?
p.s. any help in the simplest terms please. -
How can I set up MRP to use QI Stock at the Vendor, for Planned Ind Reqmts
Hi experts,
We are running ECC 6.0.
In one of our plants, we have a lot of components that are available as QI stock in Material Provided to Vendor status.
We build SKUs (MRP type M3) at the top level in the BOM, and the SKUs use the above components. We mostly enter demand at the SKU level in the plant (LSF).
We have set up the source list for all the SKUs in this plant with MRP = 1.
When MRP runs for the components (MRP type PD), system is able to first allocate the QI stock to any of the requirements that are driven by the higher level SKUs. Only then, it creates Planned Orders for the components to account for the shortage.
Issue : We now enter forecast (LSF) directly at the Component level (for some Materials). Now, even though we have excess
component stock to handle all the demand (dependant demand driven from the SKUs + LSF at the Component level), system doesn't allocate the excess QI stock to the LSF demand at the component level. It just creates Planned orders.
Strategy Group for both the SKU and Component is 10. We don't have MRP Areas implemented.
I tried setting up the source list at the Component level using the vendor but there is no use.
Does any one have an idea on how this can be addressed?We want to be able to use up the QI stock first before we create Planned orders.
Thanks,
RaoHow can you create QI stock first before your planed order from MRP run? Do you know this is not standard SAP ?
-
How can I see pictures not imported using iphoto within iphoto?
I just got a new iMac and am converting over from a Dell PC. I have thousands of pictures that I copied over. I then synced my ipad and all those pictures imported using iPhoto. I liked the ability to see Events and Faces and ws thinking I might like to bring in all of my older pictures. Is there a way to do that? Would I even want to? Would it recognize the folder structure I established for each event?
As Léonie pointed out each folder imported into iPhoto will result in an Event with the same name as the folder. In the photos mode with Event titles set to be displayed you'll get this:
Once inside iPhoto you can merge Events or drag photos from one event into another.
However if you want to create a hierarchical folder organization you'll need to do that in the left hand pane of iPhoto with folders and albums.
That is create a folder and drag events into it and you will have albums in the folder representing the events. These are only pointers to the original files and not duplicate files. Folders can hold folders, albums, books, slideshows but not individual photos. So you could create a hierarchy like this:
OT -
How can I set up iPad for use as a customer sales tool?
I want to use my new iPad for personal and business. For my business I want to hand to a customer as a self-driven presentation on my business created In Keynote or some similar program. But I'd like to lock all personal content so the customer can only explore my business content and not access personal contacts, music, etc. Can this be done? Recommendations on apps and set-up are appreciated.
Can't be done. All the customer has to do is press the home button and they're able to access all your apps.
You either need different iPads for different purposes, or mount it in a display cabinet that blocks the home button. -
How can i set page zoom level using css and javascript in firefox.
i have problem to set zoom level in firefox.
document.body.style.zoom = 150%; is worked in IE and Crome but not working in firefox so pls. i want to know a alise property that are provide a same functionality to me.Currently there is now way of retaining zoom level across pages in Single Page Mode. We have noted down your request and this might get implemented in one of our future releases. Thanks for the feedback.
- Adobe Reader Team -
PC is iMac using Mac OS X ver. 10.6.8, 64-bit Kernal and Extensions = NO
I would prefer to leave this option alone until I upgrade to "Lion"Your solution worked like a charm............. much appreciated!
\ -
How can i set image on container as JPanel
hello guys , pls help me in this question .
http://forums.java.sun.com/thread.jsp?forum=57&thread=122428
http://forums.java.sun.com/thread.jsp?forum=57&thread=172426
http://forums.java.sun.com/thread.jsp?forum=20&thread=29118
http://forums.java.sun.com/thread.jsp?forum=57&thread=117505
http://forums.java.sun.com/thread.jsp?forum=57&thread=138300 -
How can I create an alt background color for items in a jlistbox or jtree
What I'm looking to do is have a white background for say items 1,3,5, etc. and a light yellow background for items 2,4,6, etc. I was wondering how can I set an alternative background color on items in a JTree or a JList
Use a cell renderer:
import java.awt.*;
import javax.swing.*;
public class ListAlternating extends JFrame
public ListAlternating()
String[] items = {"one", "two", "three", "four", "five", "six", "seven"};
JList list = new JList( items );
list.setVisibleRowCount(5);
list.setCellRenderer( new MyCellRenderer() );
JScrollPane scrollPane = new JScrollPane( list );
getContentPane().add( scrollPane );
public static void main(String[] args)
ListAlternating frame = new ListAlternating();
frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
frame.pack();
frame.setLocationRelativeTo( null );
frame.setVisible( true );
class MyCellRenderer extends DefaultListCellRenderer
public Component getListCellRendererComponent(
JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
if (!isSelected)
setBackground(index % 2 == 0 ? list.getBackground() : Color.LIGHT_GRAY);
return this;
} -
i recently bought a new iphone 5 and gave the old iphone 4 to my mum. every time i take picstures they automatically store on the iphone 4, how can i set up a new icloud for my mum on the iphone 4 but keep everything on my iphone 5?
Your iphone 4 must still be logged into your icloud account. Go to settings>icloud, scroll to bottom of page and tap Delete Account. This will remove all your data from the old device but not from icloud or your iphone 5.
To create a new icloud account for your mum, go to
http://www.apple.com/icloud/setup/ -
How can I set a cross reference to a Picture
Hello,
I have a question regarding the new function: How can I set a cross reference (dont know the exact english name since I use the German version; in German: Querverweis) in Indesign CS4 to a picture? So far, I could only do it with a kind of workaround by putting an invisible text frame above or below the picture and referencing to that one.
Any suggestions?
TschensOr put it inside a text frame as an inline graphic. You've basically figured it out.
Peter
Maybe you are looking for
-
OS 10.4.6 won't restart or shut down
I installed 10.4.6 on my powerbook g4 that was running 10.3.9 without a problem. Big mistake. I repaired permissions, then custom installed 10.4.6 skipping the foreign language fonts and printer drivers I don't need. Installation was successful. Set
-
Program monitor and source monitor display issues
Hello, my program monitor is displaying strange colours (inverted?) when playing video. In addition, the source monitor will never display any video although audio plays back fine. I am running on a Lenovo ThinkPad X200 laptop with Windows XP 32-bit
-
If I buy a second hand nano, can I use it on my itunes?
I have been offered a second hand nano and was wondering if it is registered to their itunes can i use it on mine? If it hasn't been registered by them I presume it will be ok.
-
Where clause as expression value for parameter?
Is it possible to put a where clause in a expression so I could use as a parameter? I have 3 documents I was going to make as available values, but not sure how to put all of this in the expression. Where clause: where document = 'doc1' and sentdate
-
Messageid in subject of mail in mail-adapter
hi, we want to send ORDER-documents to our supplier via eMail. As subject in these mails we have to set the messageid of the document. Is it possible to set the subject of a mail in a j2ee-module? I didn't find any information about that in the XI- o