32,199 Topics
| |
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 … | |
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; // … | |
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 … | |
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") … | |
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 … | |
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) | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
| |
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 … | |
i want to get sum of jtable column n that value display in a jtextfield. so what is the code for that? | |
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 … | |
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 … | |
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 … | |
how to extract company name and person name phone number on visiting card java or android code anyone can help | |
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 | |
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 = … | |
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", … | |
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 … | |
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 … | |
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 … | |
Hey guys! So I'm working on a program that accepts 7 user inputs then stores them in an ArrayList. Then it replaces elements that start with the letter "B" with an aterisk. I'm getting a IndexOutOfBoundsException. Here's the code I have: ` package arraylist1; import java.util.*; public class ArrayList1 { … | |
I have a custom ListCell in which I have methods to move the position of the cell to the right or left, but I want a button to be shown similar to deleting a Conversation in Messages on iPhone. If I add a new ImageView, which will act as the … | |
Hi, I am getting java.lang.ArrayIndexOutOfBoundsException: -131072 exception. when i am running the code from my local machine (eclipse) it works fine, when i copied my code to unix server, the same code is giving error. Exception trace: =============== In generate Report Method ================= java.lang.ArrayIndexOutOfBoundsException: -131072 at xlrd.biff.CompoundFile.<init>(CompoundFile.java:282) at xlrd.biff.File.<init>(File.java:86) at … | |
Hey guys! So I'm making simple PetShop program based on an UML diagram I did. Anyway, I have 4 classes: PetShop(It's the main class), Pet, Customer, Transaction. I'm having an error on line 22 saying it cannot find symbol. I have the adopt() method in the Transaction class. Here's what … | |
Hello I need help with this java tax assignment it is asking to Write the Java code needed to perform the following:• Calculate state withholding tax at 6.0%, and calculate fed-eral withholding tax at 25.0%.• Calculate dependent deductions at 2.0% of the employee’s salary for each dependent. public class Payroll.Java … |
The End.