Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2008

Tip: Looking for answers? Try searching our database.

how to create button with image look like this one in the attached     image

Thread view: 
islamelnaggar - 04 Mar 2008 02:01 GMT
Hello how can i create button look-like this one in the image  and
have the same nehaviour if windows
like on mouse-rollover blah blah
take look at the attached image
thanks in advance
islam
islamelnaggar - 04 Mar 2008 02:04 GMT
> Hello how can i create button look-like this one in the image  and
> have the same nehaviour if windows
> like on mouse-rollover blah blah
> take look at the attached image
> thanks in advance
> islam

sorry i forget to attach image
http://mail.google.com/mail/?ui=1&realattid=f_fddti0gf&attid=0.1&disp=inline&vie
w=att&th=118778865cb37301

islamelnaggar - 04 Mar 2008 02:30 GMT
sorry the image is here
http://docs.google.com/Doc?id=dd8vt75c_52k23wkzgg
Roedy Green - 04 Mar 2008 12:05 GMT
On Mon, 3 Mar 2008 18:04:50 -0800 (PST), islamelnaggar
<islamelnaggar@gmail.com> wrote, quoted or indirectly quoted someone
who said :

>> Hello how can i create button look-like this one in the image  and
>> have the same nehaviour if windows
[quoted text clipped - 5 lines]
>sorry i forget to attach image
>http://mail.google.com/mail/?ui=1&realattid=f_fddti0gf&attid=0.1&disp=inline&vie
w=att&th=118778865cb37301

That is just a google page.  It is not in the least clear what you
want.

Please take more care in formulating your question. "Blah blah" means
bugger all.  It says to us you can't be bothered to explain. Why then
should we bother to try to decipher your request?

You can create images in a tool like
http://mindprod.com/jgloss/psp.html
or http://mindprod.com/jgloss/iconxp.html
and use them in Java programs.  For how to do rollover, see
http://mindprod.com/jgloss/jbutton.html
--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
islamelnaggar - 04 Mar 2008 12:17 GMT
On 4 مارس, 14:05, Roedy Green <see_webs...@mindprod.com.invalid>
wrote:
> On Mon, 3 Mar 2008 18:04:50 -0800 (PST), islamelnaggar
> <islamelnag...@gmail.com> wrote, quoted or indirectly quoted someone
[quoted text clipped - 24 lines]
> Roedy Green Canadian Mind Products
> The Java Glossaryhttp://mindprod.com

sir you are looking for and old message please look at this

first thanks for ur reply
what i mean will be shown by this image , please check it

http://docs.google.com/Doc?id=dd8vt75c_54hr83qmcg

i know how to build an imageicon but what i need actually is to bulid
an icon look like this one in the image and on mouseover change to be
same also what shown in the picture

Regards

any help!!!!1
islamelnaggar - 04 Mar 2008 19:30 GMT
> On 4 ãÇÑÓ, 14:05, Roedy Green <see_webs...@mindprod.com.invalid>
> wrote:
[quoted text clipped - 44 lines]
>
> - عرض النص المقتبس -

any helllp
Knute Johnson - 04 Mar 2008 03:26 GMT
> Hello how can i create button look-like this one in the image  and
> have the same nehaviour if windows
> like on mouse-rollover blah blah
> take look at the attached image
> thanks in advance
> islam

It looks to me as though you have the code on the page you posted.  If
you want to know how to get a small window with some descriptive text
when you pass over a component, look at JComponent.setToolTipText().  If
you are asking how to draw the nice little green arrow, you probably
need to ask somewhere else :-).

Signature

Knute Johnson
email s/nospam/knute/

     ------->>>>>>http://www.NewsDem

islamelnaggar - 04 Mar 2008 04:05 GMT
On 4 مارس, 05:26, Knute Johnson <nos...@rabbitbrush.frazmtn.com>
wrote:
> > Hello how can i create button look-like this one in the image  and
> > have the same nehaviour if windows
[quoted text clipped - 17 lines]
> Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
>       ------->>>>>>http://www.NewsDem

hello thanks for ur reply
what i asking for is to do icon button look like the buttons in the
windows applications toolbar like Internet explorer's navigator bar
bottons with the same effect and view on mouseover also as i mentioned
in the image i attached

Regards
Knute Johnson - 04 Mar 2008 05:33 GMT
> On 4 مارس, 05:26, Knute Johnson <nos...@rabbitbrush.frazmtn.com>
> wrote:
[quoted text clipped - 26 lines]
>
> Regards

I'm still not sure what you are asking but the code below will change
the Icon on the button when you move the mouse over the button.

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

class test7 {
    public static void main(String[] args) {
        EventQueue.invokeLater(new Runnable() {
            public void run() {
                final ImageIcon black = new ImageIcon("black.gif");
                final ImageIcon purple = new ImageIcon("purple.gif");
                JFrame f = new JFrame();
                f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                final JButton b = new JButton(black);
                b.addMouseListener(new MouseAdapter() {
                    public void mouseEntered(MouseEvent me) {
                        b.setIcon(purple);
                    }
                    public void mouseExited(MouseEvent me) {
                        b.setIcon(black);
                    }
                });
                f.add(b);
                f.pack();
                f.setVisible(true);
            }
        });
    }
}

Signature

Knute Johnson
email s/nospam/knute/

islamelnaggar - 04 Mar 2008 07:59 GMT
On 4 مارس, 07:33, Knute Johnson <nos...@rabbitbrush.frazmtn.com>
wrote:
> > On 4 ãÇÑÓ, 05:26, Knute Johnson <nos...@rabbitbrush.frazmtn.com>
> > wrote:
[quoted text clipped - 71 lines]
>
> - عرض النص المقتبس -

first thanks for ur reply
what i mean will be shown by this image , please check it

http://docs.google.com/Doc?id=dd8vt75c_54hr83qmcg

i know how to build an imageicon but what i need actually is to bulid
an icon look like this one in the image and on mouseover change to be
same also what shown in the picture

Regards
Knute Johnson - 04 Mar 2008 22:47 GMT
> On 4 مارس, 07:33, Knute Johnson <nos...@rabbitbrush.frazmtn.com>
> wrote:
[quoted text clipped - 78 lines]
>
> Regards

You have to create both images with some sort of graphic tool.  I've
used Gimp successfully to make things like this.  Then use the code I
posted to change the icon when you put the mouse on it.

Signature

Knute Johnson
email s/nospam/knute/

islamelnaggar - 05 Mar 2008 08:00 GMT
On 5 مارس, 00:47, Knute Johnson <nos...@rabbitbrush.frazmtn.com>
wrote:
> > On 4 مارس, 07:33, Knute Johnson <nos...@rabbitbrush.frazmtn.com>
> > wrote:
[quoted text clipped - 94 lines]
>
> - عرض النص المقتبس -

no it's not correct sir it's related to OS
Knute Johnson - 05 Mar 2008 18:36 GMT
> On 5 مارس, 00:47, Knute Johnson <nos...@rabbitbrush.frazmtn.com>
> wrote:
[quoted text clipped - 86 lines]
>
> no it's not correct sir it's related to OS

I think our problem here is that we are not understanding each other.
Maybe you could get somebody that is more proficient in English to help
you ask the question?

Signature

Knute Johnson
email s/nospam/knute/

Mark Space - 06 Mar 2008 21:52 GMT
> no it's not correct sir it's related to OS

What package are you using to create your GUI?  Swing?  AWT?  SWT?
Something else (KDE, MFC, GTK, etc.)?


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.