File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes how to select a block using awt inside an swt component Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "how to select a block using awt inside an swt component" Watch "how to select a block using awt inside an swt component" New topic
Author

how to select a block using awt inside an swt component

Jyothi kotla
Greenhorn

Joined: Nov 19, 2009
Posts: 11
Hello Everyone,

I am working on eclipse rcp application. I created my own plugins with views. In my plugins code I developed gui using swt where as for my canvas I used awt. I added awt inside my swt app. In one of my plugin canvas I created a quilt in which I divided my quilt into few rows and columns depends on the user selection. I am using rubber banding technique to selct some of my rows and columns. I am going to show you my attachment to get some good idea of what I am talking about. I used some of the mouse events like mouse pressed, mouse dragged and released. I want to capture my block to see if the block is selected or not. I am just thinking I have to have the index of each and every block to see If my block is selected or not. When I am dragging my mouse to select the block it's not selecting the way I want. If anyone has any idea of it, could please direct me to the correct idea or correct direction I really appreciate your help.

Thank you,
Jyothi

This is my code below :




[Thumbnail for block selection.png]

Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19542
    
  16

Please UseCodeTags. You can use the edit button to add them to your existing post.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
http://www.java-forums.org/awt-swing/29210-using-awt-inside-swt-component.html
Jyothi kotla
Greenhorn

Joined: Nov 19, 2009
Posts: 11
/

So ya I posted in Java forums. No one has answered my question, It's really urgent.

Jyothi
Jyothi kotla
Greenhorn

Joined: Nov 19, 2009
Posts: 11


So what is your point in posting that?

Thanks,
Jyothi
Jyothi kotla
Greenhorn

Joined: Nov 19, 2009
Posts: 11
Rob Prime wrote:Please UseCodeTags. You can use the edit button to add them to your existing post.


Thank you Rob I used code tags and submitted it again.

Jyothi
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> So what is your point in posting that?

I know you want a solution now, so you post the problem to numerous forums.

It's obvious you don't care that some of those trying to help you might have their time wasted,
if a solution is posted in another forum earlier.

the link was posted to alert others that the problem is posted in at least one other forum (possibly more).

basically, if my time is unimportant to you,
you getting a solution is equally unimportant to me.
Jyothi kotla
Greenhorn

Joined: Nov 19, 2009
Posts: 11
Michael Dunn wrote:> So what is your point in posting that?

I know you want a solution now, so you post the problem to numerous forums.

It's obvious you don't care that some of those trying to help you might have their time wasted,
if a solution is posted in another forum earlier.

the link was posted to alert others that the problem is posted in at least one other forum (possibly more).

basically, if my time is unimportant to you,
you getting a solution is equally unimportant to me.


Hello Michael,

I told you I posted my question in more than one forum, ofcourse it's wrong in posting one more time. You said the link was posted in other forum(possibly more), do search and tell me where did I post my code in other forums. If you don't want to answer my question don't do it, I don't like advises honestly. I know you are a senior member and everybody have to listen to you. If you could just tell me the solution I really appreciate your help, If you don't want to it don't do it.

Jyothi
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
just for future reference, if done correctly, posting in multiple forums is good
but it must be done correctly:

post your problem in abc forum
post your problem in xyz forum, including a link to the abc forum post
return to abc forum and update your post with a link to the xyz forum post

now what happens is anyone reading your post can check the other forum first to see if there's an answer already,
if not, then its obvious you still need help, and most will try to help you.

linking the posts also benefits people searching for solutions.
they might be searching abc forums for a similar problem, and their search returns your post.
the answer to their problem might be in the post at xyz forum.
with the link to the xyz forum, they get the solution.
without it, they miss the solution.
Jyothi kotla
Greenhorn

Joined: Nov 19, 2009
Posts: 11
Michael Dunn wrote:just for future reference, if done correctly, posting in multiple forums is good
but it must be done correctly:

post your problem in abc forum
post your problem in xyz forum, including a link to the abc forum post
return to abc forum and update your post with a link to the xyz forum post

now what happens is anyone reading your post can check the other forum first to see if there's an answer already,
if not, then its obvious you still need help, and most will try to help you.

linking the posts also benefits people searching for solutions.
they might be searching abc forums for a similar problem, and their search returns your post.
the answer to their problem might be in the post at xyz forum.
with the link to the xyz forum, they get the solution.
without it, they miss the solution.


OMG please stop this. It's really irritating and very humiliating. I know I posted in more than one forum that is my honest mistake.. First of all you are not answering and you are hurting me. I am just learning to programming in Java. You know you are wasting your time and mine too. WOW god If you are in my position then you will come to know how bad I am really feeling now. Please for god sake ...
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19542
    
  16

Jyothi kotla wrote:It's really urgent.

Please EaseUp.

Jyothi kotla wrote:It's really irritating and very humiliating. I know I posted in more than one forum that is my honest mistake.. First of all you are not answering and you are hurting me.

How is Michael hurting you? He's merely mentioning our overall meaning on cross posting. You can also read it at BeForthrightWhenCrossPostingToOtherSites.

Either way, enough of this discussion. Let's focus on the problem.
Jyothi kotla
Greenhorn

Joined: Nov 19, 2009
Posts: 11
Rob Prime wrote:
Jyothi kotla wrote:It's really urgent.

Please EaseUp.

Jyothi kotla wrote:It's really irritating and very humiliating. I know I posted in more than one forum that is my honest mistake.. First of all you are not answering and you are hurting me.

How is Michael hurting you? He's merely mentioning our overall meaning on cross posting. You can also read it at BeForthrightWhenCrossPostingToOtherSites.

Either way, enough of this discussion. Let's focus on the problem.



I don't know I felt it that way. This is the first time anyone has said it to me in this way. Now I know how to post a question. I am sorry I will not do this again. I don't want to drag this topic anymore. I am sorry michael. If you know what I am talking please help me with my question. If not thanks.
 
 
subject: how to select a block using awt inside an swt component
 
Similar Threads
keeping the lines
Crack showing between polygons
Keylisteners and AppletViewer
How to run my NetBeans project?
HELP ME Square root please!!!