The Artima Developer Community
Sponsored Link

Java Answers Forum
mouse clicked

2 replies on 1 page. Most recent reply: Sep 18, 2003 9:22 AM by mausam

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
Ram

Posts: 19
Nickname: srkothuru
Registered: Jul, 2003

mouse clicked Posted: Sep 17, 2003 12:24 PM
Reply to this message Reply
Advertisement
Can anyone please post an example for mouseClicked Event.
I have to click a string( a word), so that it acts like a link in a html page opening another window.
Thanks
Ram


Fay

Posts: 16
Nickname: flyfay
Registered: Sep, 2003

Re: mouse clicked Posted: Sep 18, 2003 7:47 AM
Reply to this message Reply
hope can help you!
good luck

public void actionPerformed(ActionEvent e)
{
String s = e.getActionCommand();
switch (s.charAt(0))
{
case 'C':
{
...........
break;
}
.................
}
}

mausam

Posts: 243
Nickname: mausam
Registered: Sep, 2003

Re: mouse clicked Posted: Sep 18, 2003 9:22 AM
Reply to this message Reply
Action event for mouse event???

Make ur string added to a JLabel
label.addMouseListener(new MouseAdapter()
{
public void mouseClicked(MouseEvent e)
		{
                     //tourcodehere
		}
	});
 

Flat View: This topic has 2 replies on 1 page
Topic: Accessing Oracle RAC using JDBC Previous Topic   Next Topic Topic: window.location.href= Question

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use