Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (775)
Games in Android Showcase (230)
games submitted by our members
Games in WIP (856)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  preven title bar to show in the part of your rendering screen  (Read 1297 times)
0 Members and 1 Guest are viewing this topic.
Offline pavul

Junior Devvie

Medals: 4
Exp: 4 years

« Posted 2017-08-03 13:35:54 »

when i add title bar to Jframe , my canvas for example lest say 400x400, it only shows 400 x 380, that bar is quiting space to the render screen, do you now how to fix that, i mean when i use title bar if my canvas is 400x400 to be like 400X420,
i think i can add more space, but i want to know if there is a direct/built in way.

thanks in advance.

its better not know why it works, that know why is not working
Offline Abuse

JGO Ninja

Medals: 70

falling into the abyss of reality

« Reply #1 - Posted 2017-08-03 13:43:48 »


Frame javadoc, 4th paragraph of the class description.

A frame may have its native decorations (i.e. Frame and Titlebar) turned off with setUndecorated. This can only be done while the frame is not displayable.
Offline Archive
« Reply #2 - Posted 2017-08-03 16:18:11 »

Look into Insets

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ClaasJG

JGO Coder

Medals: 43

« Reply #3 - Posted 2017-08-03 17:37:58 »

You can propably make use of Window#pack
which causes the window to be sized to fit the preferred size and layouts of its subcomponents.

@Abuse, you should read the question  Tongue


My english has to be tweaked. Please show me my mistakes.
Offline KevinWorkman

« JGO Plugged Duke »

Medals: 287
Projects: 12
Exp: 12 years - Coding Tutorials!

« Reply #4 - Posted 2017-08-04 01:40:41 »

Yep, the pack() function is the way to go. Also note that this will require you to set the sizes of your components in your window, and use appropriate layout managers. - Coding Tutorials!
Happy Coding forum - Come say hello!
Pages: [1]
  ignore  |  Print  

hadezbladez (30 views)
2018-11-16 13:46:03

hadezbladez (38 views)
2018-11-16 13:41:33

hadezbladez (20 views)
2018-11-16 13:35:35

hadezbladez (15 views)
2018-11-16 13:32:03

EgonOlsen (1892 views)
2018-06-10 19:43:48

EgonOlsen (1928 views)
2018-06-10 19:43:44

EgonOlsen (1284 views)
2018-06-10 19:43:20

DesertCoockie (1714 views)
2018-05-13 18:23:11

nelsongames (1401 views)
2018-04-24 18:15:36

nelsongames (2033 views)
2018-04-24 18:14:32
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!