This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Setting JFrame size  RSS feed

 
Alagapan Thiagarajan
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear friends,
Can u help me to set JFrame size so as to display task bar ?
I set the size of the JFrame to be that of the screen size( obtained via Toolkit.getScreenSzie) but the task bar is invisible initialy and gets displayed properly once the JFrame is maximized and restored.
Can anyone kindly tell me whatz to be done so that, when the frame gets displayed for the first time, it assumes the screen size, allowing enough space to display the task bar ?
Thank you.
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Alagapan,
IMO, you can't do anything about it. My reasoning:
1. Taskbar is OS specific (exists on Windows not on Mac or Unix)
2. Taskbar can be placed anywhere on screen (even off screen! Made visible only with mouse location near it!)
3. Java is written to be independent of OS so I don't believe it has any classes that can be used only for a single OS.
That being said, you might consult a Windows forum to see if there is some OS call to figure out the location and size of the task bar ...
Regards,
Manfred.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!