2 Replies - 1799 Views - Last Post: 19 August 2014 - 08:15 AM Rate Topic: -----

#1 fleebow8   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 19-August 14

Calculator Grid Layouts

Posted 19 August 2014 - 03:59 AM

So I'm making a calculator using JFrame and that stuff and I need help figuring out the GridLayouts. I'm not doing this for homework or anything just for fun. I don't need all the grid layouts but just some help figuring 1 or 2 out. Attached is an image of what I want the calculator to look like:
Attached Image

Is This A Good Question/Topic? 0
  • +

Replies To: Calculator Grid Layouts

#2 mike73   User is offline

  • D.I.C Addict
  • member icon

Reputation: 250
  • View blog
  • Posts: 918
  • Joined: 24-April 10

Re: Calculator Grid Layouts

Posted 19 August 2014 - 06:13 AM

GridBagLayout might actually be easier in this case, especially since the equals button is bigger than the rest(or is that not the case?) and you might want to leave some grid spaces empty, eg 5th column 1st row in your picture.

Here is a great tutorial which uses this layout by andrewsw, it even has a nice helper method to easily add components to your GUI

This post has been edited by mike73: 19 August 2014 - 06:13 AM

Was This Post Helpful? 1
  • +
  • -

#3 fleebow8   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 19-August 14

Re: Calculator Grid Layouts

Posted 19 August 2014 - 08:15 AM

Thanks a lot! Will check the video out.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1