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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

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: 22850
132
Eclipse IDE Spring 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
 
    Bookmark Topic Watch Topic
  • New Topic