How can i put image in a button?
I need to put an image ( .bmp ) in a button, but i don't know how.
I need it because in web forms the icons ( files .ico) no show.
How can i solve this problem?
Thanks!!
Hello Arun ,
Thank you for your help. i tried it but it didn't work. i am sure that is my fault. i try to create a toolbar and i place a button in the toolbar. Then i set the property iconic to yes and i give to the iconfilename property the name of my bmp file. i suppose that the application cannot see the bmp file. i'll try to read some documentation , because as i can see it's little difficult.
again thanx for your help Arun.
Similar Messages
-
Hi i have some omages which i need to put on a button can i do that in java. I cannot use swings cause i am using java 1.1.7. can i do something using awt.
Is there ImageButton in jdk 1.1.7 ???
Please help me in this.
Please post a sample code if any one can
Thanks
RamHi This is my actual program.
I have some images posted and some buttons. But can i click on the images to open new files or can i put an image on a button. I donno how to use mouse click. or how do i map an image.
Can i also mouse click on a text string???
import java.awt.*;
import java.awt.event.*;
import java.awt.event.MouseEvent;
import java.applet.*;
import java.io.*;
import java.lang.String;
public class chemviz extends Frame implements ActionListener
private Button offwaltz, nanocad;
private Panel PagePanel, buttonPanel;
private Image logo;
private Image nanocadhome, waltzhome;
//private TextArea TextArea1;
private String About = "About";
private String test= "This is a Test";
//test.setFont(new Font("Arial",Font.BOLD,12));
public String line1 = "ChemViz (Chemistry Visualization) is an interactive chemistry program which incorporates computational chemistry simulations ";
public String line2 = "and visualizations for use in the high school chemistry classroom. The chemistry simulations support the chemistry principles ";
public String line3 = "teachers are trying to convey, and the visualizations allow students to see how matter interacts at an atomic level.";
public void loadPanel()
//ImageIcon offwaltz = new ImageIcon("images/waltzhome.jpg");
//offwaltz = new Button(offwaltz);
offwaltz = new Button("OffWaltz");
offwaltz.addActionListener(this);
nanocad = new Button("Nanocad");
nanocad.addActionListener(this);
buttonPanel = new Panel(new FlowLayout(FlowLayout.CENTER));
buttonPanel.add(offwaltz);
buttonPanel.add(nanocad);
//TextArea1 =new TextArea(text, 10, 100);
MenuBar mb = new MenuBar();
setMenuBar(mb);
Menu fileMenu = new Menu("File");
mb.add(fileMenu);
MenuItem exitMenuItem = new MenuItem("Exit");
fileMenu.add(exitMenuItem);
exitMenuItem.addActionListener(this);
PagePanel = new Panel();
PagePanel.setLayout(new GridBagLayout());
GridBagConstraints c = new GridBagConstraints();
c.anchor = GridBagConstraints.NORTH;
c.gridwidth = 1;
c.gridx = 0;
c.gridy = GridBagConstraints.RELATIVE;
c.weightx = 1;
c.weighty = 1;
c.insets = new Insets(0, 0, 0, 0);
//PagePanel.add(TextArea1, c);
//PagePanel.add(buttonPanel, c);
setLayout(new GridBagLayout());
add(PagePanel, c);
PagePanel.setLocation(0, 100);
//PagePanel.setSize(100, 100);
setVisible(true);
public void update(Graphics g)
paint(g);
public void paint (Graphics g)
g.drawImage(logo, 0, 30, this);
//g.drawString(About, 20,150);
//setFont(new Font("Arial",Font.BOLD,12));
g.drawString("About", 20,130);
g.drawString("Tools", 70,130);
g.drawString("Curriculum", 120,130);
g.drawString("Resources", 200,130);
//g.drawString("Test", 690,130);
//g.drawString("This is a Test String", 20,130);
g.drawString(line1, 50,175);
g.drawString(line2, 20,200);
g.drawString(line3, 20,225);
g.drawRect(38,373,148,168);
g.drawImage(nanocadhome, 40, 375, this);
g.drawRect(248,373,148,168);
g.drawImage(waltzhome, 250, 375, this);
//System.out.println("Test is ending");
public void imagePanel()
logo = Toolkit.getDefaultToolkit().getImage("images/logo.jpg" );
nanocadhome = Toolkit.getDefaultToolkit().getImage("images/nanocadhome.jpg" );
waltzhome = Toolkit.getDefaultToolkit().getImage("images/waltzhome.jpg" );
public void actionPerformed(ActionEvent e)
String s = e.getActionCommand();
String osCommand = "cmd /q /c start /w";
if (e.getSource() instanceof MenuItem)
String menuLabel = ((MenuItem)e.getSource()).getLabel();
if(menuLabel.equals("Exit"))
dispose();
System.exit(0);
if (e.getActionCommand().equals("OffWaltz"))
try
Runtime.getRuntime().exec("cmd.exe /c java -jar offwaltz.jar ");
catch (IOException ex)
System.out.println( ex.toString() );
if (e.getActionCommand().equals("Nanocad"))
try
Runtime.getRuntime().exec("cmd.exe /c java -jar nanocad.jar ");
catch (IOException ex)
System.out.println( ex.toString() );
public static void main(String args[])
chemviz frame = new chemviz();
frame.addWindowListener(new WindowAdapter()
public void windowClosing(WindowEvent e)
{ System.exit(0); }});
frame.setSize(800, 600);
frame.imagePanel();
frame.loadPanel();
frame.setVisible(true); -
How can i put image in table column
Hii
I have to make one application in which i m going through JTable but look shoud not be like that ....border of row and column should be invisiable and in the last column Image should be displayed....... i m unable to find this..
can anybody help me ...
Vaibhav GuptaBoth of these question have been answered recently, like in the last 30 minutes. Check out other threads for you answers.
Cheers
DB -
TabbedPanels Tab - How can we put individual images on each tab button?
Hi,
How can we put individual propeties (like size, background images etc) in each tab button of TabbedPanels Tab?
ThanksWow ! Itz amazing !! .... This is what 'm exactly looking for
Thanks a lot Gramps
Alin -
On Firefox 4, how can I put one "new tab" on the "tab bar" (The + sign) and one next to the "back/forward" buttons (as in FF 3.6)?
In my current Firefox, the "new tab" icon/item from the "customize" pop-up window menu of items is placed next to my home, back, forward buttons near the top-left of my header (Button 1 for "new tab"). Then, the tab bar automatically come with a small tab (with a + sign) to the right of your last tab opened (so you click on + and a new tab opens. Button 2 for "new tab"). I like to have this "new tab" button twice (as a + mini tab, and next to my "home icon".
When I upgraded to Firefox 4, I seemed to be only able to "customize" or use the "new tab" in one place. Either as an icon next to home button, or as a "+ minitab", but NOT both.
What can I do to put this button in Firefox 4 on BOTH places???
Your help is really appreciated. I want to upgrade, but I want my buttons on both places...
I upgraded to FF 4, but downgraded again just because this feature... that's just me of coarse :-)*New tab toolbar button: https://addons.mozilla.org/firefox/addon/new-tab-toolbar-button/
-
HOW CAN I PUT A PERMANENT CAPTION ON A JPEG IMAGE?
I have Elements 8 operating (successfully!) with Windows 7. How can I put a caption on the Jpeg that will actually appear on the photo and will show on a print? I would like the caption to run along the bottom of the image. I believe that using the "Title" feature in Pre Elements will not imprint itself on the jpeg file image. Am I right?
Hi,
Use the text tool. Make a box in the approximate location you wnt the caption, choose a font and size, and type the caption into the box. You can then use the move tool to fine-tune and adjust the location. When satisfied, you can flatten and save the image. Hope this helps. -
On FCP7, how can I put down an image say at 1 minute in, and then have it stay put as I adjust what's in front of and after it?
Put the scene that you want to stay in one place on the timeline on a video track above the one you are editing, in the location you want it to be on the timeline, and then lock the track.
MtD -
How can i put FPM Buttons in custom FPM Views.
Hi,
How can i put FPM Buttons in custom FPM Views.
Couldn't locate them in web dynpro layout or FPM Views and application in Portal Content.
Thanks,Hi,
you should describe a little bit more what you want to do (e.g. navigation buttons or buttons in containers like e.g. in ESS Address). FPM usually has a quite high reusability so button components are often reused. In case there is already a button component that has everything you need you can just use the self-service administrator to add this view to the right perspective in your FPM application. In case you talk about those buttons that are in the Overview screens than those buttons are dynamically generated.
In case you just want to have your own button then create this button and fire an FPM event from it. You need to add this event to the FPM view configuration in the self-service administrator. Alternatively you can create a button component and reuse it later. -
How can i put a submit button in a survey and it send to my email
how can i put a submit button in a survey and it send to my email?
Hi williamm89908146,
You need to open the form in which you want to put the submit button,
then you have to choose 'Add new field' under Tasks pane on the right Hand side of the window.
Choose 'Ok' Button
Place the button at desired Location
Change the field name to 'Submit'
Click on 'All Properties' (Button Properties window Will open up)
Click on Actions Tab and then on 'Select Action:'
Choose 'Open a web Link' from the Drop Down Menu and then Click 'Add'
another window will appear in which you have to type this: mailto:[your email address], eg: mailto:[email protected] later click close
Click Close Form editing on the right hand side of the window
Clicking on the Button would open up your default email client and your address would appear in 'To' field.
Please feel free if you face any challenges in following through these steps.
Regards,
Rahul -
IMovie 11 : how can I put one image without its associated sound on an audio (without its image) ? thanks
Hi
As iMovie doesn't orient after Time - but only after Video/Photo clips is this not so easy to do.
I use black photos as Dummy clips - and put them into a new project first
then I add the Music I want
Then I drop the Video-clip (that I realy want) ontop of the black dummy photo - Where it's supposed to be - THEN IF advanced tools are selected (in iMovie preferences) there will be a Drop-Down menu and here I can select to do a Cutaway - and select not to add the audio from it (or in wave-form just silence it out)
Yours Bengt W -
How can I put an image onto a postcard format?
How can I put an image onto a postcard format?
By postcard format do you mean crop the picture into a postcard shape?
If so, here is one way: Activate the Rectangular Marque tool. Set Style to Fixed Aspect Ratio, and enter the dimensions for Width & Height. In this example I used a standard postcard size of 6" x 4.25". Open your picture, draw out the rectangle, and Image > Crop. The picture will now be in the 6 x 4.25 proportion.
To get it to the actual 6" x 4.25" size, do Image > Resize > Image Size. Check the Constrain Proportions Box, and enter either the true Width or Height; the other dimension will change accordingly.
If this is not what you are trying to do, please be more specific. -
How can I put an image of a painting centered on to a blank 4x6 postcard?
How can I put an image of a painting centered on to a blank 4x6 postcard?
moopartist wrote:
How can I put an image of a painting centered on to a blank 4x6 postcard?
Go to File>new>blank file. Enter the dimensions, background color to suit. For resolution, it's best to have the same value as that of the image. For printing, it is desirable to have the resolution in the 240-300px/in range, although I have printed below this range.
Open the file with the painting. Use one of the selection tools, e.g. selection brush, lasso tool, and select the image.
Go to Edit>copy
Open the blank file
Go to Edit>paste. The selection will come in on its own layer
Use the move tool to position, and, to resize (if necessary) with the corner handles of the bounding box. -
How can I put an image/s in Java Application?
Hi to all.
How can I put an image/s in Java Application?
I can put some images in Java applet but when i try to put it in Java application there was an error.hey u can easily do it with JLabels...i found a Code Snippet for u
public class MyPanel extends JPanel
{private JLabel imageLabel; public MyPanel() { Image image = Toolkit.getDefaultToolkit().getImage("myimage.gif"); // Could be jpg or png too imageLabel = new JLabel(new ImageIcon(image)); this.add(imageLabel); }}
hope it helps
Cheers,
Manja -
How can I put the close button in the mainframe of the dialog?
Hi all,
I am creating a new dialog and I would like to konw...
How can I put the close button in the mainframe of the dialog?
Thanks in advance.
Best regards,
Juanma.Juanma,
Usually, a dialog would have an OK and a Cancel button, both can be served as the close button, but if user clicks the ok button (DefaultButtonWidget) to close the dialog, your dialog controller's (if it is based on CDialogController) ApplyDialogFields will get called so you can react to the OK action, otherwise, if user clicks the cancel button (CancelButtonWidget), nothing will happen. The dialog simply is dismissed.
See BasicDialog SDK sample to see how to add DefaultButtonWidget and CancelButtonWidget to a dialog.
Thanks!
lee -
How can I put my icloud photos to camera roll or photo stream?
I got a nee iphone, i backed up everything and restored it into mu new iphone, but the pictures didn't restore so i did it manually but now on my phone i got different albums icloud photo stream and camera roll. How can i put the icloud picture into camera roll or photo stream. Any ideas?? On my old iphone ive deleted everything.
Hello Ozzie94,
Thanks for the additional information. The camera roll is designed for photos taken on your device, or saved images from Mail and other applications. Photos synced from a computer are organized into their own album(s):
View photos and videos - iPhone
http://help.apple.com/iphone/7/#/iph3d267610
- Camera Roll—photos and videos you took on iPhone, or saved from an email, text message, webpage, or screenshot
- Shared photos and videos—Photos and videos that you’ve shared with iCloud Photo Sharing or that others have shared with you (see iCloud Photo Sharing)
- Photos and videos synced from your computer (see Sync with iTunes)
Additionally, you may find more information by using another one of Apple's support resources - https://getsupport.apple.com
Thanks,
Matt M.
Maybe you are looking for
-
How do I reboot my Macbook pro 2011 to a new internal hard drive?
I had to get a new internal hard drive and I can't afford to pay some one to do it for me. So I was wondering how do I install the operating system on to the hard drive? Thanks
-
Clicking on an app tab shouldn't remove it from that browser window but it does, seems to sort of defeat the purpose of App Tabs in my opinion. then I have to drag the new tab back into the other browser window and then it works for a little while co
-
Firefox crashes getting more frequent - maybe associated with Symantec PGP?
In January Firefox crashed 6 times. On 1/22 I did a full reinstall of Firefox. Did not crash again until 2/25 but then crashed 3 times in 4 days. In March has crashed 5 times in first 12 days. Don't know if crash report is simply blocked from occurri
-
Imac problems using Snow Leopard 10.6.1
I have been running my Imac perfectly with no problems at all on 10.5 but having recently installed 10.6.1 it has started playing up. On startup it sometimes freezes with no key or mouse movement at all which needs a rear button restart to cure it an
-
VoiceOver cannot get into iPad
VoiceOver has locked me out the screen is locked