|
|||
|
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. |
|
|
||||
|
||||
|
|
|
|||
|
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/ |
|
|||
|
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. |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
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 |
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |