Question: images

Ads

 
 
 

Share on Google+Share on Google+

tarun1
images
1 Answer(s)      8 years ago
Posted in : Java Beginners
Ads
View Answers

October 14, 2008 at 4:48 PM


Hi friend,


import java.awt.*;
import javax.swing.*;

public class AddImageJButtons extends JFrame {
public static void main(String[] args) {
new AddImageJButtons();
}

public AddImageJButtons() {
super("Using Add Image JButtons");
Container content = getContentPane();
content.setBackground(Color.white);
content.setLayout(new FlowLayout());
JButton button1 = new JButton("Java");
content.add(button1);
ImageIcon cup = new ImageIcon("/home/vinod/amarexamples/javalogo.gif");
JButton button2 = new JButton(cup);
content.add(button2);
JButton button3 = new JButton("Java", cup);
content.add(button3);

setSize(300,200);
setVisible(true);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
}

--------------------------------------------------------------------

Please visit for more information,

http://www.roseindia.net/java/example/java/swing/

Thanks

Ads









Related Tutorials/Questions & Answers:
Images in java
Images in java  how to handle images in java
Moving The Images
Moving The Images  How to moving multiple images in one frame using swings
Advertisements
inked images
inked images  How do I eliminate the blue border around linked images
images upload
images upload  I use netbeans IDE 6.8 How i upload any image from any folder to web page
jsp images
jsp images  hi I had done a demo application using jsp. And i tried to display some images which is located in the server folder. It has done by using the IP address path of that image folder.. It has been success full in IE
insert images into a Mysql database
insert images into a Mysql database  How can I insert images into a Mysql database
uiscrollview add images
uiscrollview add images  How to add dynamic images to UIScrollView
HTML background images
HTML background images  How can I specify background images
Displaying images - JDBC
Displaying images  How to display multiple images on a single jsp from MySql database
Displaying images - JDBC
Displaying images  How to display multiple images on a single jsp from MySql database
background images in css not working
background images in css not working  In the application i'm passing a background image from CSS in the given format ... background-image: url... of adding background images in css
Adding images in itext pdf
Adding images in itext pdf  Hi, How to add image in pdf file using itext? Thanks   Hi, You can use following code: PdfWriter.getInstance(document,new FileOutputStream("imagesPDF.pdf")); Read more at Inserting
Blob images - JSP-Servlet
Blob images  Hi sir how can i retrieve blob images from database using jsp from mysql  Hi Friend, Please visit the following link: http://www.roseindia.net/jsp/retrieve-image.shtml Hope that it will be helpful
regarding images in jsp
regarding images in jsp  Hi, When I am trying to display an image in jsp, i am getting the image of bar charts in webroots/jspchart/web/jspbarchart.jsp.. But actually I am not getting any image in the browser.. Can any one help
java mail sending with images
java mail sending with images  I need to send images through java mail without giving content path(i.e. we don't want hard code the image path)can you tell me the idea?   Please visit the following links: http
need photoes,images - JavaMail
need photoes,images  hi this is nagarjuna. i need james binary server2.3.1 architecture. and i dont know about how it works. i have to give one seminar on mailing technology. so pls send the gif images,and some
upload images - JSP-Servlet
upload images  How to write the jsp code to upload images into database.   Hi Friend, The link we have provided you will allow you to upload any file therefor it can also upload an image and can insert
how to space images in html code
how to space images in html code  how to space images in html code
WHAT TYPES OF IMAGES THAT PHP SUPPORTS?
WHAT TYPES OF IMAGES THAT PHP SUPPORTS?  WHAT TYPES OF IMAGES THAT PHP SUPPORTS
JList Background Images..Urgent
JList Background Images..Urgent  I has done a JList that can change background color when i selected each of it, but if i want to change background image rather than background colors, how can i do it? Please help! my previous
images - Java Beginners
images  how to do image watermarking in java? or how to identify watermarked images.. tell something related to the watermarking concept implementation in java?  Hi Friend, Try the following code: import java.io.
how to display multiple images on browser
how to display multiple images on browser  i want to display multiple images on brower including string values from sql database using jsp
how to display multiple images on browser
how to display multiple images on browser  i want to display multiple images on brower including string values from sql database using jsp
space around/between my images
space around/between my images  How do I eliminate the space around/between my images
Sending images through java mail
Sending images through java mail  Am trying to develop greeting application that having images..... in one jsp page i displayed all images and by clicking one image the control go to mail sending page in that the image should add
get images from web service
get images from web service  How to get images from web services in iPhone application?   to get images from web service xml? For Uploading NSString *encodedString=[self encode:(const uint8_t*)_secretData.bytes
Moving Images in GUI - Swing AWT
Moving Images in GUI  I want to add an image of a person in my GUI and make it move to a specific location. How can I add the image to the frame and move
Collision Detection between two images in Java
Collision Detection between two images in Java  Collision Detection between two images in Java
how to upload and download images using buttons in jsp?
how to upload and download images using buttons in jsp?  how to upload and download images using buttons in jsp
how to save images in oracle using JSP
how to save images in oracle using JSP  how to insert images in oracle using jsp
Tutorials   
Java Spring Hibernate Struts Training What is the meaning of Java Platform? Why Java is a platform independent language? What is the benefits of learning Core Java? Which technology should I learn after Java? What is array in java with example? How to Convert ArrayList to Array? How to substring in Java? How to format number in Java? What is instance variable in Java? How to download MySQL JDBC driver? What is Calendar class in Java? Which is the best Java tutorials for beginners? How to rename a file in Java? How to delete file in Java code? How to get day from date in Java using Calendar? How to get day of week in Java? How to calculate Date Difference in Java? How to compare date in Java? How to declare array in Java? How to calculate average of array in Java? What is Array in Java? write a java program to find the summation of all the integers entered on command line Sum of two numbers using command line arguments in Java How to create and use Array in Java? How to pass command line arguments in Java? How to create Applet Hello World? Appending String efficiently in Java How to append String in Java? How to list even numbers between 1 and 100? How to add BigDecimal in Java? What is Abstraction In Java? Which is best Beginners Java Tutorial? What is java.util package? Create list from array in Java Filter collection in Java 8 What is the best way to filter a Java Collection? Easy way to transform Collection to Array? How to convert Collection to Array in Java? What are Basic Java Language Elements? Advanced Java Tutorials in 2017 Java brief history Best Reasons to learn Java Java Example Codes and Tutorials in 2017 How do I read a large file quickly in Java? Is learning Java worthwhile? How to create first Java Program? Retrieve database from the table dynamically in jsp from oracle using servlet What does core Java include? java What are some way to learn Java quickly?

Ads

 
Advertisement null

Ads