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 / GUI / September 2004

Tip: Looking for answers? Try searching our database.

Graphics e JScrollPane

Thread view: 
d4nbl0 - 29 Sep 2004 17:52 GMT
ciao ho un problemino con un interfaccia grafica.

Ho un pannello sul quale richiamo Graphics(poich? devo disegnarci).
Il mio problema ? che molto spesso il disegno va fuori dallo schermo, allora
ho pensato di inserire il pannello dentro ad un JScrollPane. ma il problema
non si risolve.

Sapete darmi una dritta?

Grazie mille della disponibilit?
andreas - 29 Sep 2004 19:44 GMT
> ciao ho un problemino con un interfaccia grafica.
>
[quoted text clipped - 8 lines]
>
> Grazie mille della disponibilit?

ciao,
sfortunatamente no parlamos italiano...

andreas
andreas - 29 Sep 2004 20:01 GMT
>> ciao ho un problemino con un interfaccia grafica.
>>
[quoted text clipped - 8 lines]
>>
>> Grazie mille della disponibilit?

as i stated, we don't speak italian.
i can guess though:

you have a panel called graphics and your problem is, that
the painting often is outside the monitor, now you thought of inserting the
panel
into a JScrollPane, but it doesnt resolve the problem.

if this is more or less the correct translation, i would try this:
//this here refers the the class implementing JFrame

Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
//set your window size depending on your screensize, factor is for example 2
this.setSize(new Dimension(screenSize.getWidth()/factor,
screenSize.getHeight()/factor);
//then add the JScrollPane which contains your panel
myScrollBar.add(myPane);
this.getContentPane.add(myScrollBar);

andreas
Andrew Thompson - 29 Sep 2004 20:18 GMT
> as i stated, we don't speak italian.
> i can guess though:

Various language tools can help you get pretty
close guesses in a technical discussion..
<http://www.google.com/language_tools?hl=en>

The translations are somtimes quite funny, but usually
understandable if the OP has taken care to express themselves
properly in their native tongue.

Signature

Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.lensescapes.com/  Images that escape the mundane

andreas - 30 Sep 2004 00:20 GMT
> Various language tools can help you get pretty
> close guesses in a technical discussion..
[quoted text clipped - 3 lines]
> understandable if the OP has taken care to express themselves
> properly in their native tongue.

and here is the result:

hello I have a problemino with a graphical interface.  I have a panel on
which Graphics(poich? callback I must design to us).  My problem is that a
lot often the design goes outside from the screen, then has thought to
insert the panel within to a JScrollPane.  but the problem is not resolved.
Sapete gives one to me straight?  Thanks thousands of the availability

andreas
Andrew Thompson - 30 Sep 2004 00:58 GMT
A)   setPreferredSize()

(snip translation)

Thanks andreas, I didn't have time with that one, but if
I read it right, the OP needs to lock the size of the
container/panel on which they are drawing.

Signature

Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.lensescapes.com/  Images that escape the mundane



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.