32,199 Topics

Member Avatar for
Member Avatar for FUTURECompEng

Hi, I created a game in which players take turns entering their symbol by clicking on a box that is implemented on a grid window. I am having a hard time being able to check if the player has four symbols in a row diagonal or up or down or …

Member Avatar for FALL3N
0
292
Member Avatar for learntosucceed

I'm noob at GUI Swing. I have 2 questions. 1)I'm trying to implement a program that reads a text file, so I can use it to add multiple tabs to the program based on the amount of data in the text file. For example, text file have 3 names. I …

Member Avatar for nandosss
0
2K
Member Avatar for bhallarahul

hi everyone you guys helped me many time this time again i need your help Actually i want to learn struts frame work and i read the content of 2-3 sites but i m not able to learn how to run my first simple application. Can any one help me …

Member Avatar for bhallarahul
0
130
Member Avatar for mits28

I want to count the total no of rows in a table [CODE] Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con = DriverManager.getConnection("jdbc:odbc:gabbar"); Statement ps1 = con.createStatement(); ResultSet count = ps1.executeQuery("SELECT COUNT (*) FROM products ); //products is a table in database [/CODE] count is of ResultSet type.but i want to do arithmetic operation on …

Member Avatar for stultuske
0
452
Member Avatar for dantinkakkar

I want to build a network protocol analyzer, but I really don't know where to start. Obviously, I don't want the code in hand, I can think it up myself -- but the problem is a little more specific - where do I look at to get the IPs passing …

Member Avatar for dantinkakkar
0
285
Member Avatar for shean1488

Hi everybody. I'm working on my program. And have this output storred in the object puzzle: [CODE]Puzzle is: 1 5 9 13 2 6 10 14 3 7 11 15 4 8 12 16 2 6 10 14 3 7 11 15 4 8 12 16 5 9 13 1 …

Member Avatar for DavidKroukamp
0
307
Member Avatar for Stjerne

Hi guys, So I'm doing an assignment right now. One of the tasks is about listing files. It wants you to insert a name, either directory or a certain file, and give you a message with some informations. So I'm trying to finish the part where I enter a directory …

Member Avatar for stultuske
0
177
Member Avatar for dantinkakkar

The problem is, that I want to read data and analyze it from a promiscuous network device programmatically using java. Using existing software like WireShark/DarkStat is NOT a solution. I wanna do it myself. Any hints on where do I start?

0
81
Member Avatar for sha11e

What I want to do is 1. Take strings from the user and store it in a vector<string> 2. Loop through each string, typing each letter of the string How would I go about doing this? Robot r = new Robot(); [CODE]char letter = 'a'; r.keyPress( (int) letter )[/CODE] Won't …

Member Avatar for stultuske
0
2K
Member Avatar for dantinkakkar

Alright, so I tried to write a little short guide on Object Input and Output to files, since the worst situation one can find themselves is being unable to serialize files in a proper and readable format. One way to do so is to create an object of a class …

0
78
Member Avatar for wallet123

hi, our final exam will be on next week, i want our program to be different may i ask how to put colors on texts of JOptionPane on the background and how to change font size and style and how to put sound effects.. please make it easy to understand …

Member Avatar for wallet123
0
85
Member Avatar for shaan_046

Error :: org.springframework.web.servlet.DispatcherServlet noHandlerFound I am attaching all the relevant files. Please help..?? web.xml [CODE] <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5"> <servlet> <servlet-name>loginSer</servlet-name> <servlet-class> MyPackage.LoginServlet </servlet-class> </servlet> <servlet-mapping> <servlet-name>loginSer</servlet-name> <url-pattern>/LoginServlet.do</url-pattern> </servlet-mapping> <servlet> <servlet-name>Timeserv</servlet-name> <servlet-class> MyPackage.TimeServlet </servlet-class> </servlet> <servlet-mapping> <servlet-name>Timeserv</servlet-name> <url-pattern>/timeservlet</url-pattern> </servlet-mapping> <servlet> <servlet-name>filter</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> …

0
95
Member Avatar for 47pirates

My server is in python and I'm trying to read and write to socket using ObjectInput/Output Streams whenever i write to socket there is some characters written in socket before my writeObject() command is executed and whenever i tried to read the data from socket using readObject() , it gives …

Member Avatar for dantinkakkar
0
219
Member Avatar for drico7041

Hey, I created a phone directory program. But I was wondering if I could get some hints on how I could create a txt file and add, delete names and numbers on the txt file. [CODE]import java.util.*; import java.lang.*; import java.lang.Object; import jpb.*; public class PhoneDir { private static LinkedList …

Member Avatar for dantinkakkar
0
3K
Member Avatar for blake81

ChatBot class: A chatbot is a computer program designed to simulate an intelligent conversation with one or more humans. In this lab, we will establish the framework for our chatbot, which will be enhanced throughout the semester. The ChatBot class will define a name field that identifies the chatbot (name …

Member Avatar for dantinkakkar
0
489
Member Avatar for mohamed moamen

How i can make my server receive data from certain client and send it to other certain one ? (Note : there is a lot of clients connected with that server) , that's alike private chat between two clients .

Member Avatar for dantinkakkar
0
444
Member Avatar for shean1488

Here is the code for the programm. My question is why this statement in SudokuValidator doesn't work? [CODE]for (Cell[] myPuzzle : puzzle) {[/CODE] it gives me errors: [CODE] Exception in thread "main" java.lang.NullPointerException at SudokuValidator.isSolution(SudokuValidator.java:54) at SudokuValidator.main(SudokuValidator.java:27) [/CODE] [CODE]import java.util.*; public class Cell { int value; public Cell() {} // …

Member Avatar for stultuske
0
264
Member Avatar for adamb0mb

[CODE]import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; class Mortgage { private static double round(Double val) { // round the value to two decimal places int vala = (int) (val * 100); return (double) (vala / 100.00); } public static void main(String[] args) throws IOException { double loanAmount = 200000.00; // Loan …

Member Avatar for thines01
0
202
Member Avatar for Valiantangel

[ICODE]System.out.println("Extra credit\nRe-enter number of seconds:"); int j = input.nextInt(); int i =(j/60); int k = (j%60); System.out.println(j+" seconds is " +i+" minutes and "+k+" seconds.");[/ICODE] Hi when i key in 30 for j the correct answer should be [COLOR="Red"]30seconds is 0minutes and 0seconds.[/COLOR] However my above code gives me 30seconds …

Member Avatar for zeroliken
0
82
Member Avatar for cisumma

I am having trouble understanding how to set up the smtp property. I do not have internet connection now. I wanted to use my Outlook or something. What do I do to get Glassfish to generate emails so I can begin learning how to code my app to send emails …

Member Avatar for ztini
0
176
Member Avatar for Hussam Alahmadi

i can not understand my Home work plz help me this is the Question ...... Problem 1. Write a program in which you will do the follwing: 1. Declare a two-dimensional array of double with 12 rows and 30 columns to store daily temperatures for one year assuming each month …

Member Avatar for DavidKroukamp
-1
133
Member Avatar for riahc3

Hey I want to get the date and time with miliseconds in a format such as: 2012-02-09 12:41:52.982 or 2012-02-09 16:41:52.129 How can I do this in Java? (If I can get a localized version of "Tuesday" as "Tues" as well even better but if not, I dont mind. Something …

Member Avatar for riahc3
0
432
Member Avatar for HBK_100

[CODE] private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: String sql="Select BADGE_NUMBER,FIRST_NAME from POLICE_TABLE"; try { Class.forName("org.apache.derby.jdbc.ClientDriver").newInstance(); Connection con= (Connection) DriverManager.getConnection("jdbc:derby://localhost:1527/Traffic Ticket System","Administrator","admin1234"); /*As we are creating a connection on a local computer we will write the url as jdbc:mysql://localhost:3306 */ Statement stmt=con.createStatement(); ResultSet rs = …

Member Avatar for JamesCherrill
0
175
Member Avatar for Hussam Alahmadi

help me plz The program does not sum the elements of the 2 matrix this my code [CODE]package javaapplication143; import java.util.*; public class JavaApplication143 { public static void ReadMatrix(int [][]a1 ){ int val=0; Scanner input=new Scanner(System.in); System.out.println("Enter 3 rows and 3 Columns for matrix 1 "); for(int i=0 ; i …

Member Avatar for dantinkakkar
0
129
Member Avatar for shibu2all

Hello, Can anyone pls help me out with this code, its the server portion of the client server program..i have downloaded it from net [code=java] Socket s,s1,s2; ArrayList al=new ArrayList(); ArrayList al1=new ArrayList(); ArrayList al2=new ArrayList(); ArrayList alname=new ArrayList(); MyServer()throws IOException{ ServerSocket ss=new ServerSocket(10004); while(true){ s=ss.accept(); s1=ss.accept(); s2=ss.accept(); al.add(s); al1.add(s1); …

Member Avatar for dantinkakkar
0
180
Member Avatar for thefifthhjohn

in line 7 I have three errors. TextFieldOutputDemo.java:7 '.class' expected (where it points to 't' in "throws") FileOutputStream(String, boolean)throws FileNotFoundException; TextFieldOutputDemo.java:7 ';' expected (where it points to 't' in "throws") FileOutputStream(String, boolean)throws FileNotFoundException; TextFieldOutputDemo.java:7 not a statement (where it points to 'F' in "FileNotFoundException") FileOutputStream(String, boolean)throws FileNotFoundException; [CODE]import java.io.*; public …

Member Avatar for dantinkakkar
0
398
Member Avatar for RLS0812

I need to keep a string from resetting each time the class is called, but haven't found any good way of doing it ... Every time [B]if (block != LastC){}[/B] evaluates to true. ( which shouldn't happen very often ) [CODE] --- code snip --- public class Player_Move implements Listener …

Member Avatar for stultuske
0
141
Member Avatar for DEAD TERMINATOR

An assignment I'm working on requires me to write a method for the sole purpose of calling that method in a later method. As such I am required to write the first method to not display anything on screen and then I need to comment the calculation within the method. …

Member Avatar for stultuske
0
341
Member Avatar for wallet123

i was watching a tutorial about bubblesort, and i followed all the instructions the difference is that the tutor is using System.out while im using JOPtionPane, please help me thank you help me find my error and help me run it correctly! [CODE]public static void main(String[] args) { // TODO …

Member Avatar for rushikesh jadha
0
182
Member Avatar for hyperstars

After an hour of browsing the web, I decided to ask for help for my IB project (can't paste my whole code or I'll be cheating off myself). I don't have much experience, so please explain whatever syntax your solution may have (please don't say rewrite the whole thing). Anyway, …

Member Avatar for JamesCherrill
0
200

The End.