This week's giveaway is in the Testing forum.
We're giving away four copies of TDD for a Shopping Website LiveProject and have Steven Solomon on-line!
See this thread for details.
Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
    Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

GridBagLayout Manager ? How i create screen with the help of gridbaglayout?

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
HI aLL,:
Can anyone help me please ?how i can use the GridbagLaout and GridBagConstraints in the following code .Can any one create the code for the following screen with this manager for same look and feel ?



code here......


[edit - added code tags - MB]
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
> Can any one create the code for the following screen with this manager for same look and feel ?

doesn't look too hard.

if you want someone to do it for you, try rent-a-coder
 
Sheriff
Posts: 22647
126
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Because we are NotACodeMill.
 
Parveen thakur
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Thanks Both of you but any one tell me how to use gridbaglayout insted of setbounds...

this.getContentPane().setBackground(Color.WHITE);
this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
this.setLayout(null);
getLogoLabel().setIcon(new ImageIcon(getClass().getResource("/Images/Vm_img.png")));
getLogoLabel().setBounds(5,0,220,50);
this.add(getLogoLabel());
getVbmlogoLabel().setIcon(new ImageIcon(getClass().getResource("/Images/vmlogo2.png")));
getVbmlogoLabel().setBounds(350,180,250,200);
this.add(getVbmlogoLabel());
getReleaseVersionLable().setBounds(800,10,200,25);
getReleaseVersionLable().setFont(new Font("Courier New", Font.ITALIC, 11));
this.add(getReleaseVersionLable());
getReleaseVersionDataLable().setBounds(970,10,200,25);
getReleaseVersionDataLable().setFont(new Font("Courier New", Font.ITALIC, 11));
this.add(getReleaseVersionDataLable());
getPowerByLable().setBounds(30,600,300,25);
getPowerByLable().setForeground(c);
getPowerByLable().setFont(new Font("Courier New", Font.ITALIC, 11));
this.add(getPowerByLable());
this.setBackground(Color.BLACK);
this.setTitle("VBM Data Review - Login");
this.setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("/Images/icon.png")));
/* myParams.getLabelHead().setBounds(500,30,300,25);
this.add(myParams.getLabelHead());*/
getPanel().setBounds(650,150,400,300);
getPanel().setBorder(BorderFactory.createLineBorder(null));
getPanel().setLayout(null);
getPanel().setBackground(Color.WHITE);
getUserNameLabel().setBounds(30,100,150,25);
getPanel().add(getUserNameLabel());
getUserTextField().setBounds(150, 100, 150, 25);
getPanel().add(getUserTextField());
getPasswordLabel().setBounds(30, 150, 150, 25);
getPanel().add(getPasswordLabel());
getPasswordTextField().setBounds(150, 150, 150, 25);
getPanel().add(getPasswordTextField());
Color c= Color.decode("#6495ED");
getSubmitButton().setBounds(150,220,150,25);

getSubmitButton().setBackground(c);
getSubmitButton().setForeground(Color.WHITE);
getPanel().add(getSubmitButton());
getMassegelabel().setBounds(15,255,400,15);
getMassegelabel().setFont(new Font("Curier New", Font.ITALIC, 11));
getPanel().add(getMassegelabel());
/*getResetButton().setBounds(620,300,100,25);
this.add(getResetButton());
getExitButton().setBounds(740,300,100,25);
this.add( getExitButton());*/
this.add(getPanel());
this.getRootPane().setDefaultButton(getSubmitButton());
this.getSubmitButton().addNotify();
//this.setSize(1000,500);
this.setResizable(false);
this.setSize(screensize.width,screensize.height);
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Please do not post, essentially the same question multiple times. UseOneThreadPerQuestion
Let us continue the discussion in your original topic here https://coderanch.com/t/555746/GUI/java/create-screen-comaptible-all-resoluions
 
Hey, sticks and stones baby. And maybe a wee mention of my stuff:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
    Bookmark Topic Watch Topic
  • New Topic