Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

can anybody run this code in java and send me the screenshots please.

can anybody run this code in java and send me the screenshots please. 

 ATTACHMENT PREVIEW Download attachmentWeek 3 Programming AnswersProblem 1:importjava.awt.*;importjavax.swing.*;publicclassCalculatorextendsJFrame{JTextFielddisplay;JPanelbuttonPanel;JButtonbuttons[];Calculator(){super(“Calculator”);display=newJTextField();buttons=newJButton[16];buttons[0] =newJButton(“7”);buttons[1] =newJButton(“8”);buttons[2] =newJButton(“9”);buttons[3] =newJButton(“/”);buttons[4] =newJButton(“4”);buttons[5] =newJButton(“5”);buttons[6] =newJButton(“6”);buttons[7] =newJButton(“*”);buttons[8] =newJButton(“1”);buttons[9] =newJButton(“2”);buttons[10] =newJButton(“3”);buttons[11] =newJButton(“-“);buttons[12] =newJButton(“0”);buttons[13] =newJButton(“.”);buttons[14] =newJButton(“=”);buttons[15] =newJButton(“+”);buttonPanel=newJPanel();

Background image of page 1

View the AnswerbuttonPanel.setLayout(newGridLayout(4,4,5,5));for(inti = 0, j = 0; i < 16; i++){buttons[i].setFont(newFont(“SanSerif”, Font.BOLD,16));if(i % 4 == 0)j++;if(j++ % 2 == 0){buttons[i].setBackground(Color.BLACK);buttons[i].setForeground(Color.WHITE);}else{buttons[i].setBackground(Color.WHITE);buttons[i].setForeground(Color.BLACK);}buttonPanel.add(buttons[i]);}add(display, BorderLayout.NORTH);add(buttonPanel, BorderLayout.CENTER);setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);setSize(250, 250);setVisible(true);}publicstaticvoidmain(String[] args){Calculator calc=newCalculator();}}Problem 2:importjavax.swing.*;importjava.awt.*;publicclassAlignment{privateJFrameframe;privateJButtonokJButton;privateJButtoncancelJButton;privateJButtonhelpJButton;privateJTextFieldxJTextField;privateJTextFieldyJTextField;

Background image of page 2

Show 

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"