32,204 Topics

Member Avatar for
Member Avatar for sam_7

I will be implementing MVC model in my program but before that, I have done a simple program based on my understanding of the MVC model. I have three pages: - The user will enter a value in page one and click the next button. - The value will be …

Member Avatar for JamesCherrill
0
267
Member Avatar for Dhaval3731

Basic Code Requirements •create a project called TheShipment •create at least two classes 1.Main a.contains the main method b.runs the program 2.Shipment a.calculates the cost of the Shipment Main Class (the class that contains the main method) •prompts the user to enter a id and to enter details about a …

Member Avatar for JamesCherrill
-1
164
Member Avatar for Ahmed_62

public static boolean isEmpty(int grid[][]) { for (int r = 0; r < grid.length; r++) for (int c = 0; c < grid.length; c++) if (grid[r][c]==0) { return true; } return false; } the question is : after returning true it back to (for loop) or not ????

Member Avatar for stultuske
0
157
Member Avatar for SpottyBlue

Hi, The ticket counter program looks fine, but I have ran into a different problem. It is regarding about the transaction class (lines 64 - 110). After I input the number of tickets to print out, it will register to the transaction class. But when I want to view the …

Member Avatar for JamesCherrill
0
1K
Member Avatar for Michael_43

I have been working on this String Split method and the special for loop that I am currently trying to get to properly work does not seem to be working no matter what I do. It keeps printing just the parent directory and not the lower directories. public boolean moveDown(String …

Member Avatar for stultuske
0
198
Member Avatar for Michael_43

Hi Ive been working on this for a while and have everything wokring excep the movedown method which does not work properly. It wont allow me to go to a subdirectory and cannot seem to get it do do properly Ive tried nested loops and while loops none of which …

Member Avatar for JamesCherrill
0
362
Member Avatar for SpottyBlue

Hey, it's been a year never using Java. I want to get help with this, so I was trying to print the number of ticket entered, but got error. Can help? import java.util.*; class Transport { protected double price; // Price per person for each transport protected int seatsRemaining; // …

Member Avatar for JamesCherrill
0
704
Member Avatar for rohtashrathore

Hi All, I have a problem in my jdialog(child) and the parent frame is jframe,it is taking two events to close the jdialog,both from the close caption available at the upperright corner of the dialog,as well as from the button add where i have used dipose() to close on single …

Member Avatar for mKorbel
0
248
Member Avatar for sam_7

my confirm button action listener is not printing the username and password even though I added a Actionlistener for it. please help thanks. Codes LoginDialog.java import java.awt.BorderLayout; import java.awt.FlowLayout; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JDialog; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JPasswordField; import javax.swing.JTextField; @SuppressWarnings("serial") …

Member Avatar for sam_7
0
371
Member Avatar for laguardian

Hello guys! So I'm trying to create this online shopping system for a project. I was wondering if there is a way to gather user input piece by piece then consolidating them in an ArrayList? The first part I'm working on is the registration part. I'm planning to make the …

Member Avatar for jwenting
0
200
Member Avatar for rohtashrathore

Hi All, I want to save values into database through a jdialog when the save or add event clicked.This is child container of jframe which are having many submenu lateron i will add values to these jtable in main menu(jmenu)

Member Avatar for rohtashrathore
0
75
Member Avatar for centenond

So i have 2 players on screen and a player send a attack, what i want is that if x,y are different of x,y destPos move only diagonal towards the destination position. if just x is different well move x only, same with y. I know i have to some …

Member Avatar for JamesCherrill
0
108
Member Avatar for divinity02

can someone tell why am i getting loopin. trying to build this game and it is only looping * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here String p1name, p2name; int p1age, p2age, score, sum = 0; int largest …

Member Avatar for divinity02
0
225
Member Avatar for Start4me

I'm trying to show a user JOptionPane where they enter x and y coordinates each in their own textfield, but I don't know how to store user input as ints. So I need to do something like: int xCorFromUser = xCor; int yCorFromUser = yCor; I have this code so …

Member Avatar for mKorbel
0
1K
Member Avatar for mgold

I've been learning a lot about machine learning (mostly clustering and regressions), but when I've looked into programming libraries/environments, I've found "production ready" ones to be few and far between. What I mean by "production ready" is that it could be incorperated into a product, not just used a tool …

Member Avatar for thaifoodlover
0
346
Member Avatar for thaifoodlover

Dear DaniWeb community, I am not from computer science background (math guy) but I am interested in machine learning and apache mahout. I have used Mahout CLI and recently looked at development environment and wanted to ask you: while running mahout CLI, we do not have dependencies but in development …

0
120
Member Avatar for rogerwar

Hi there I am working on a Web application where I need a section called AddNews.This section is under control by Admin of an web application.Admin can add any types of news in the form of Text,Images,Videos and later other user can view it on Latest News section. My Question …

Member Avatar for anand01
0
186
Member Avatar for blindmailreader
Member Avatar for Saboor880

HI to all frndz! I have started learning Java and in a case study I have got some errors I have written a class address book and an error is occurring due to following code snipet persons.add(p); and the error message is: "Address Book has tried to run an unchecked …

Member Avatar for JamesCherrill
0
160
Member Avatar for Gayan Maduranga
Member Avatar for Gayan Maduranga
0
112
Member Avatar for nitin1

I have made very simple code to larn the functionality. String str = "ABC"; InputStream input = new ByteArrayInputStream(str.getBytes()); BufferedReader reader = new BufferedReader(new InputStreamReader(input)); System.out.println(Character.valueOf((char) reader.read())); System.out.println(reader.read()); System.out.println(reader.read()); System.out.print(reader.read()); Secondly this one, String str = "ABC"; InputStream input = new ByteArrayInputStream(str.getBytes("UTF-8")); System.out.print(input.read()); System.out.print(input.read()); } output is same for the …

Member Avatar for JamesCherrill
1
3K
Member Avatar for nitin1

I have one project named P2PTicTac. I have one file named layout.java. and one with CLient.java. I have made simple GridView in layout file with 9 buttons in 3*3 Grid. I have run two threads in client.java. One for reading the data from server and one for writing data to …

Member Avatar for JamesCherrill
0
1K
Member Avatar for Saifuddin_1

I'm creating a wizard page in eclipse using SWT libraries. So far I have succeeded in creating the page but with only one issue:- SWT composite doesn't get selected. My wizard page contains a scrolledComposite containing multiple composites in a grid fashion. Each composite contains a browser just like a …

Member Avatar for Saifuddin_1
0
242
Member Avatar for malladiram
Member Avatar for peter_budo
0
78
Member Avatar for Benjamin_13

i am developing a mobile game application and i need your help How to code a counter that give marks to a player in a cetrain game? thank you

Member Avatar for JamesCherrill
-1
34
Member Avatar for nitin1

public class Input { static InputStream reader = null; /** * @param args * @throws IOException * @throws InterruptedException */ public static void main(String[] args) throws IOException, InterruptedException { Test test = new Test(); test.start(); String str = "1 21"; // Scanner scan = new Scanner(System.in); try { reader = …

Member Avatar for JamesCherrill
0
134
Member Avatar for manalibhadula

Hi I have written a code for sending a mail, it was working fine before and now it hangs at tranport.send(). Can any one help, here my code `Inline Code Example Here` try { System.out.println("Sending Email initiated..."); Properties properties = System.getProperties(); properties.put("mail.smtp.auth", "false"); properties.put("mail.smtp.starttls.enable", "true"); properties.put("mail.smtp.host", _host); properties.put("mail.smtp.port", _port); properties.put("mail.smtp.connectiontimeout", …

Member Avatar for manalibhadula
0
2K
Member Avatar for jsefraijeen

i'm a newbie in java and i got an assignment to do and i don't know how to start ... the problem is: Write a program that will compute for the product of two numbers without using the * operator.. Sample Output: Enter Num1 :___ Enter num2 :___ Product is …

Member Avatar for JamesCherrill
0
9K
Member Avatar for laguardian

Hello there! I've created a method that searches for the customer with the highest deposit. Here's what I have so far: public Customer searchHighestDeposit(ArrayList<Customer> customers){ for(int i=0; i<customers.size();i++) if(customers.get(i).getBankAccount().getBalance()>customers.get(i+1).getBankAccount().getBalance()) return customers.get(i); else return customers.get(i+1); return null; The output is kinda weird: "The customer with the highest deposit is: bank.Customer@c390508" The …

Member Avatar for JamesCherrill
0
179
Member Avatar for bhupen8

Dear all, i am trying to design a purchase form in which i wish to use jtable , when i press any character into the cell it should open a jlist with populated values from database and which let me select only one item from there and get the selected …

Member Avatar for JamesCherrill
0
218

The End.