Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Swing-AWT window in center
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


mohd adnan
window in center
1 Answer(s)      2 years and 5 months ago
Posted in : Swing AWT


if i run the programme thw window is in lie in top left corner i want a window open in center..........


Advertisement
View Answers

April 15, 2012 at 3:04 PM


For this you have to perform following:

  1. Get Screen size of the Computer:

int height=Toolkit.getDefaultToolkit().getScreenSize().height; int width=Toolkit.getDefaultToolkit().getScreenSize().width;

  1. Get size of your Java component (Jframe etc)
  2. Do set bounds of your component (For example use following for Jframe [JFrame.setBounds(x, y, width, height)])


Related Tutorials/Questions & Answers:
window in center
window in center  if i run the programme thw window is in lie in top left corner i want a window open in center
Window
Window  how to create an window of a person like regestration form
Advertisements
center a table
center a table  How do I center a table
Showing div at the center of the webpage
Showing div at the center of the webpage  Showing div at the center of the webpage
jquery dialog box center
jquery dialog box center  How to create dialog box with center alignment in jquery..?   $('my-selector').dialog('option', 'position', 'center
Vertically center page
Vertically center page  I know how to center the text of the page Horizontally ..but is it possible to vertically center page in HTML or CSS?  ... as given below... Vertically center page in CSS .className{ width:300px
How to center a frame
How to center a frame In this tutorial, you will learn how to center a frame on screen. A Frame is a top-level window having a title and a border and its... and minimize also. Here we are going to center the frame on the screen
Mozilla Developer Center
Mozilla Developer Center       Great site to get a first look at AJAX. Read full Description
Window Blind
Window Blind  Custom built . Over 30 years of shutter experience. Free in-home consultations
how to display the image in center - Ajax
how to display the image in center  i want to dispaly the image as center of the screen using javascript..while i am clicking the button ..any one give me the code for this one
Chat window
the chat window pops up.. It is a div in the chat homepage.. There are few other... in the same application. I want to know how to retain the chat window (along..., the chat window should be constant across all pages in the application for current
Open Source Media Center
Open Source Media Center Open source media center for Windows Why buy a Media Center PC when you can make your own - fun project for an old PC "Media Portal turns your PC in a very advanced Multi-Media Center / HTPC
window closing
window closing  hello, In my project i have login,logout and some jsp pages are there and each jsp page is using javascript and onunload script. and i need one solution that,when ever user trying to close browser window
Multi window
contains all the details. when i submit this page, a new window opens and asks to enter password. if password entered is correct, the flow goes to previous window
Window Script
Window Script  i want to write windows script can you help me in writing those i want to write script so that it follows below steps Step 1) downloading file from FTP 2) Unzip it 3) Edit it 4) zip it 5) upload again to FTP
PHP GD center text
- 1, $border); $text = 'This is the text which is center of image..._width = $font_width * strlen($text); $position_center = ceil(($width..., $position_center, $position_middle, $text, $textcolor); header("Content-type
minor project on service center management in core java
minor project on service center management in core java  I need a minor project on service center management in core java...If u have then plz send me
active window means
active window means  active window means what?   The active window is the term used to describe the window that is currently being used
Passing values from child window to parent window.
Passing values from child window to parent window.  Hai, I'm having a requirement ,in that when i open a (pop-up)child window from a parent window,the child window will contain multiple checkboxes and when i select multiple
making help window
making help window   how to make help window in gui with java
pop up window in java
pop up window in java  How to open a pop up window in Java
Passing values from child window to parent window.
Passing values from child window to parent window.  http://www.roseindia.net/java/pass-value-example/pass-value-child-to-parent.shtml I have gone thru the link but my requirement is checkboxes.can u please explain
How to display the font in center
How to display the font in center       This section illustrates you how to display the font in center. To display the font in center, the method paint() is defined
Java Help Center
Java Help Center       Welcome to Java help Center service of RoseIndia.net, a renowned Java tutorial website that provides you the latest and up
Java window state event
Java window state event  Two java windows, one on top of another... Window at the back is deactivated when the other is on the top. Can iconify when there is only one window using win+d key. In windows, press win+d, window
Prototype Window Class
Prototype Window Class       This javascript class allows you to add window in a HTML page... if you include effects.js file , but it's not mandatory. Prototype Window
Pop Up window - WebSevices
Pop Up window  How refresh pop up window,Tell me correct code for this problem.  Hi friend, I am sending a link. This link will help you. Visit for more information. http://www.roseindia.net/jsp/popup-window
Window State - Swing AWT
Window State  Thanks for you reply. I have already tried the setSize() method of AWT Window and also with JFrame. But I want to Maximize the Window when it is opened by the user and instead of the Maximize
JSP Window. Open
JSP Window. Open          JSP Window. Open  is used to open a new window in JSP. The JavaScript function  window.open( ) open a new browser
window addsubview remove in iPhone
window addsubview remove in iPhone  Hi, How to add a splash screen or some other view and then remove it and add new view. I want program... code: [window addSubview:tabBarController.view]; To remove
child window - Development process
child window  I want to create new small window on my website using java script. But i couldn't hide the status bar in small window. How to do this one ? Kindly help me.   Hi Friend, Please visit the following
Advertisements
 

 

 

DMCA.com