Go Back   Rhinocerus > Newsgroup > Newsgroup comp.lang.java.* > Newsgroup comp.lang.java.programmer

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 09-25-2007, 09:08 PM
iherage@gmail.com
Guest
 
Posts: n/a
Default JPanel resize with mouse problem

Hello,

I have a question about how to resize the JPanel with mouse.

There are mainPanel, jPanel1 and jPanel2. The Layout of mainPanel is
BorderLayout. jPanel1 is added to the west while jPanel2 is added to
the center.
What I am going to implement is to move the mouse over the border of
jPanel1, then it shall change to Cursor.E_RESIZE_CURSOR. And with the
move of the mouse, jPanel1 and jPanel2 shall be resized.

Anyone has ideas about this? I have googled again and again and try it
myself. But I still cannot make it.

Can anyone provide some help for me. Thank you for the help.

Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

  #2 (permalink)  
Old 09-25-2007, 09:46 PM
Knute Johnson
Guest
 
Posts: n/a
Default Re: JPanel resize with mouse problem

iherage@gmail.com wrote:
> Hello,
>
> I have a question about how to resize the JPanel with mouse.
>
> There are mainPanel, jPanel1 and jPanel2. The Layout of mainPanel is
> BorderLayout. jPanel1 is added to the west while jPanel2 is added to
> the center.
> What I am going to implement is to move the mouse over the border of
> jPanel1, then it shall change to Cursor.E_RESIZE_CURSOR. And with the
> move of the mouse, jPanel1 and jPanel2 shall be resized.
>
> Anyone has ideas about this? I have googled again and again and try it
> myself. But I still cannot make it.
>
> Can anyone provide some help for me. Thank you for the help.
>


I don't know how to do that but why don't you just use
a JFrame instead. It will do exactly what you want and
handle the cursor and everything.

--

Knute Johnson
email s/nospam/knute/
Reply With Quote
  #3 (permalink)  
Old 09-25-2007, 11:28 PM
Andrew Thompson
Guest
 
Posts: n/a
Default Re: JPanel resize with mouse problem

On Sep 26, 7:08 am, iher...@gmail.com wrote:
....
> I have a question about how to resize the JPanel with mouse.


Put it in an JSplitPane.

As for your latter question 'without mouse', try
JSplitPane + JButton(s) - "Bigger"/"Smaller".

But I say that with little more understanding of
your questions than as expressed by Knute.

Andrew T.

Reply With Quote
  #4 (permalink)  
Old 09-26-2007, 12:31 AM
Andrew Thompson
Guest
 
Posts: n/a
Default Re: JPanel resize with mouse problem

Andrew Thompson wrote:
>On Sep 26, 7:08 am, iher...@gmail.com wrote:
>...
>> I have a question about how to resize the JPanel with mouse.

>
>Put it in an JSplitPane.
>
>As for your latter question 'without mouse', try
>JSplitPane + JButton(s) - "Bigger"/"Smaller".


I got an email from the OP stating..
"no. I am asked to use the just the JPanel, not JSplitPane."

Now, in case you are confused. Do *not* send me email.
I reposted your comment here on the assumption that you
simply clicked the wrong button when replying.

Please take more care in future which buttons you click,
as further emails from you to me will be deleted without
being read.

--
Andrew Thompson
http://www.athompson.info/andrew/

Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.asp...neral/200709/1

Reply With Quote
  #5 (permalink)  
Old 09-26-2007, 09:25 AM
iherage@gmail.com
Guest
 
Posts: n/a
Default Re: JPanel resize with mouse problem

On 9 26 , 2 31 , "Andrew Thompson" <u32984@uwe> wrote:
> Andrew Thompson wrote:
> >On Sep 26, 7:08 am, iher...@gmail.com wrote:
> >...
> >> I have a question about how to resize the JPanel with mouse.

>
> >Put it in an JSplitPane.

>
> >As for your latter question 'without mouse', try
> >JSplitPane + JButton(s) - "Bigger"/"Smaller".

>
> I got an email from the OP stating..
> "no. I am asked to use the just the JPanel, not JSplitPane."
>
> Now, in case you are confused. Do *not* send me email.
> I reposted your comment here on the assumption that you
> simply clicked the wrong button when replying.
>
> Please take more care in future which buttons you click,
> as further emails from you to me will be deleted without
> being read.
>
> --
> Andrew Thompsonhttp://www.athompson.info/andrew/
>
> Message posted via JavaKB.comhttp://www.javakb.com/Uwe/Forums.aspx/java-general/200709/1


Sorry. Yes I clicked the wrong button. I am very sorry for that!
I think the Split Panes will work now.

Thank you very much

Reply With Quote
  #6 (permalink)  
Old 09-26-2007, 11:29 AM
Andrew Thompson
Guest
 
Posts: n/a
Default Re: JPanel resize with mouse problem

iherage@gmail.com wrote:
...
>Sorry. Yes I clicked the wrong button. I am very sorry for that!


It's cool. ( I am saying that, guessing that means
you intend to take a little more care with the buttons.

>I think the Split Panes will work now.


Excellent. Glad you got a workable solution, &
since it is more like what the end-user would expect,
I am thinking they will be grateful as well. :-)

--
Andrew Thompson
http://www.athompson.info/andrew/

Message posted via http://www.javakb.com

Reply With Quote
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: SAS Problem nospam@HOWLES.COM (Howard Schreier Newsgroup comp.soft-sys.sas 0 05-03-2006 03:23 AM
Re: SAS ETL- is Password Protection for files a problem? GE Consumer Finance Newsgroup comp.soft-sys.sas 1 01-18-2006 09:17 AM
Re: need help in solving this problem toby dunn Newsgroup comp.soft-sys.sas 1 07-06-2005 02:26 PM
Re: Help on a grouping problem nospam@HOWLES.COM (Howard Schreier Newsgroup comp.soft-sys.sas 0 02-16-2005 02:52 AM
Re: Help on a grouping problem Sigurd Hermansen Newsgroup comp.soft-sys.sas 0 02-15-2005 11:49 PM



All times are GMT. The time now is 09:40 AM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.