- Upvotes Received
- 3
- Posts with Upvotes
- 3
- Upvoting Members
- 3
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
7 Posted Topics
Hi, can someone help me? I have two Jframes: Frame and MainFrame. My problem is they both show at the same time. If the login is correct MainFrame opens and Frame closes. [CODE]import javax.swing.*; public class Main extends JFrame{ public static void main(String args[]) { //Frame Window /Login Window Frame … | |
Re: [CODE]{ String a="Welcome"; a=a.replace((a.charAt(5)),'5'); System.out.println(a); }[/CODE] Here is a simple code. | |
Re: { System.out.println("goOn now is:" +goOn); System.out.println("Do you want to do another tranaction? "); String next = keyboard.next(); if (next.equalsIgnoreCase("y")) { goOn = true; System.out.println("goOn now is:" +goOn); } if (next.equalsIgnoreCase("n")) { System.exit(0); } } Move this code inside your do - while. :) | |
Re: [CODE]for (int i = 0; i < number.length(); i++) // i get problem here [/CODE] remove "()". ;) [CODE] { number[i] = JOptionPane.showInputDialog("Enter a number between 1 and 100"); //store the input to array }[/CODE] Add Integer.parseInt. :) [CODE]number[i] = Integer.parseInt(JOptionPane.showInputDialog("Enter a number between 1 and 100"));[/CODE] | |
Re: public static void main (String[] args) { int restart; restart = JOptionPane.showConfirmDialog( frame, "Would you like to amortize another loan?", "Restart?", JOptionPane.YES_NO_OPTION); | |
Re: [QUOTE]coordinator = keyboard.next();[/QUOTE] You initialized coordinator 7 times. ;) [QUOTE]//Display full paragraph with string data[/QUOTE] Print each line. :) [CODE]System.out.println ("Dear " + coordinator, + " I am sorry that I am unable to turn in my assignment on time.");[/CODE] | |
Can someone give me a simple coding/alternatives than the one I use because I think mine is just too long.. [CODE]import java.io.*; public class MidtermGrade { public static void main(String arg[]) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int qz1,qz2,qz3,as1,as2,wexm,hoexm; double aveqz=0,aveas=0,aveexm=0,clstnd=0,mdtrm=0; System.out.print("******************************\n"); System.out.print("Enter Quiz1: "); qz1=Integer.parseInt(br.readLine()); System.out.print("Enter … |
The End.