Skip to content
Open
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/simplejavacalculator/UI.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public UI() throws IOException {

font = new Font("Consolas",Font.PLAIN, 18);

text = new JTextArea(1, 30);
text = new JTextArea(1, 15);

textFont = new Font("Consolas",Font.BOLD, 24);

Expand All @@ -95,15 +95,15 @@ public UI() throws IOException {
butMinus = new JButton("-");
butMultiply = new JButton("*");
butDivide = new JButton("/");
butEqual = new JButton("=");
butSquareRoot = new JButton("sqrt");
butSquare = new JButton("x*x");
butOneDividedBy = new JButton("1/x");
butEqual = new JButton("=");
butSquareRoot = new JButton("<html>&#8730;x</html>");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we avoid having html tags inside JButton…?
I wonder if there is any alternatives?

butSquare = new JButton("<html>x<sup>2</sup></html>");
butOneDividedBy = new JButton("<html>1 &#8260; x</html>");
butCos = new JButton("Cos");
butSin = new JButton("Sin");
butTan = new JButton("Tan");
butln = new JButton("ln");
butxpowerofy = new JButton("x^y");
butln = new JButton("ln");
butxpowerofy = new JButton("<html>x<sup>y</sup></html>");
butlog = new JButton("log10(x)");
butrate = new JButton("x%");
butabs = new JButton("abs(x)");
Expand Down