+ 2

Why my codePlayground doesnot show a pop up window on Android is this problem annoying you too!!!!

9th Jun 2017, 8:27 AM
Chaman Raghav
Chaman Raghav - avatar
7 odpowiedzi
+ 6
Maybe, you don't say that it has a alert box... If possible, show me the problem.
9th Jun 2017, 9:05 AM
Iwan
Iwan - avatar
+ 5
Jip
9th Jun 2017, 9:43 AM
Iwan
Iwan - avatar
+ 5
Nope not any alerts included
9th Jun 2017, 11:43 AM
Iwan
Iwan - avatar
+ 4
post your code dude.
9th Jun 2017, 9:19 AM
Amjad
Amjad - avatar
+ 3
import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; public class Program { public static void main(String[] args) { gui go = new gui(); go.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); go.setSize(400,200); go.setVisible(true); } } public class gui extends JFrame{ private JPanel mousepanel; private JLabel statusbar; public gui(){ super("the title"); mousepanel = new JPanel(); mousepanel.setBackground(Color.RED); add(mousepanel, BorderLayout.CENTER); statusbar = new JLabel("default"); statusbar.setBackground(Color.BLUE); add(statusbar, BorderLayout.SOUTH); thehandler handler = new thehandler(); mousepanel.addMouseListener(handler); mousepanel.addMouseMotionListener(handler); } private class thehandler implements MouseListener, MouseMotionListener{ public void mouseClicked(MouseEvent event){ statusbar.setText(String.format("the mouse is righy now on %d , %d",event.getX(),event.getY())); } public void mousePressed(MouseEvent event){ statusbar.setText("you sre pressing the"); }; public void mouseReleased(MouseEvent event){ statusbar.setText("you rrlease the mouse"); } public void mouseEntered(MouseEvent event){ statusbar.setText("you entered the cursor in the panel"); mousepanel.setBackground(Color.RED); } public void mouseExited(MouseEvent event){ statusbar.setText("You are now out of space"); mousepanel.setBackground(Color.WHITE); } //now these are the methods of mouse motion listener public void mouseDragged(MouseEvent event){ statusbar.setText("youare draging the mouse"); } public void mouseMoved(MouseEvent event){ statusbar.setText("you moves the mouse") ; } } }
9th Jun 2017, 11:42 AM
Chaman Raghav
Chaman Raghav - avatar
+ 3
see this is the code and problem persists with all of import jfame or flowlayout code
9th Jun 2017, 11:43 AM
Chaman Raghav
Chaman Raghav - avatar
+ 1
problem is this that actually I am using to write code on Android application of solo learn and here it says that "time limit exceeds" while running the code
9th Jun 2017, 11:47 AM
Chaman Raghav
Chaman Raghav - avatar