32,199 Topics

Member Avatar for
Member Avatar for WargRider

I was testing out a networking script of mine, and it worked fine locally. It is basically a replica of a very bare bones multiplayer game network, where multiple clients connect to a master server, each client can say anything that it wants, and the server redirects that message to …

Member Avatar for WargRider
0
2K
Member Avatar for P00dle

[CODE]try { File realFile = new File(file); boolean rename = realFile.renameTo(new File("C:\\Dummy Files 2\\" + file)); if (rename) { System.out.println(file + " was moved succesfully"); boolean delete = realFile.delete(); if (delete) { System.out.println(realFile.getAbsolutePath() + " was deleted"); } else { System.out.println(realFile.getAbsolutePath() + " could not be deleted"); } } else …

Member Avatar for P00dle
0
279
Member Avatar for sukritiboo11
Member Avatar for kishore sy
-1
63
Member Avatar for angellove40

//I am just practing java in vacation.So i tried to create JFrame with Events Handling //But getting error .Also i want to know that when i click submit button the new frame //appear and the old frame must get disappear .PLS help import java.awt.*; import java.awt.event.*; import javax.swing.*; public class …

Member Avatar for NormR1
0
214
Member Avatar for kefeir

[code]import java.awt.*; import java.awt.event.*; import javax.swing.*; public class fahrenheitPanel extends JFrame { { } private JLabel JLCelsius, JLFahrenheit; private JTextField JTFahrenheit,JTCelsius; private JButton Convert; private ConvertButtonHandler cHandler; public fahrenheitPanel() {//the constructor JLCelsius=new JLabel("fahrenheit",SwingConstants.LEFT);//creating the JLabels for celsius JLFahrenheit=new JLabel("Celsius",SwingConstants.LEFT);//creating the JLabels for fahrenheit JTFahrenheit=new JTextField("0");//crealting the textfield for fahrenheit JTCelsius=new …

Member Avatar for NormR1
0
250
Member Avatar for hazeeel

I have to read the co-ordinates of a 3D object from the txt file and store it in an array. But I need to store it in a JAR file so that I can view the final product in my visualizer (Jmol). How do I get about in doing that?

Member Avatar for NormR1
0
152
Member Avatar for P00dle

I'm trying to move a file to a different directory using .renameTo() This isn't working, as the file is still in the original dir after the code has completed, and there is a copy of the file in the target directory. I tried deleting the original file, which doesn't work. …

Member Avatar for P00dle
0
249
Member Avatar for ttchiwandire

Hie guys, I'm very glad to forward my burden to you, because I know I can consider it solved already. Right, I've been developing a website in java(netbeans IDE) using Hibernate and Java Server Faces. Now I've reached the stage of reporting. One tool I have researched about is Jasper …

0
39
Member Avatar for SeanC

I am familiar with the differences between public and private. However, I read many online explanations about 'protected'. What I gather is that a protected field can be viewed and manipulated by all classes within the package, and all subsequent subclasses, ragardless of what package they are in right? Well …

Member Avatar for bulger2503
0
122
Member Avatar for mavs123

Create a program with this problem using the “Observer pattern”, STRICTLY When a Message is sent to a Mailing List, the Mailing List sends a copy of the Message to every Inbox that has subscribed to the List. When an Inbox receives a message, it displays this notification: New Message …

Member Avatar for mavs123
0
124
Member Avatar for raghujosh

I am trying to connect to SQL SERVER 2008 using a JDBC connection. I have read some older posts on this topic(SQL server 2000, SQL server 2005) and I feel there may be some minor variations and so am posting on this forum. I am running win XP with SP …

Member Avatar for raghujosh
0
493
Member Avatar for ahmedshayan

I have been trying to connect Database in Java for a quit time now. Following is the code. I have worked with .mdb extension, but this time I am using .accdb extension. Database File. [icode] import java.sql.*; class DB{ static Connection con; static Statement sta; static void getDBConnection(String path) { …

Member Avatar for NormR1
0
103
Member Avatar for sauravmakkar

hello evry1 my name is saurav and i'm doing my 3rd yr computer engg in diploma and as evry1 knw dat we hav to make a project in the last yr. so can u plzz suggest me some topics in java and .net bcas i'm a diploma student. plzz suggest …

Member Avatar for NormR1
-2
84
Member Avatar for thr

Hello there is an easy way to install eclipse plugins on eclipse IDE that explained at below link but i can't use it in linux ubuntu!! this way work properly under windows and mac osx please help me to use this way in my ubuntu lucid lynx linux [url]http://www.venukb.com/2006/08/20/install-eclipse-plugins-the-easy-way[/url] In …

Member Avatar for masijade
0
134
Member Avatar for prashantharbola

hi, i have checked that the modem i am using is a voice modem. the problem i am facing is while making or receiving call using modem,the sound from the other side i.e the telephone line is clear in the modem ports for headphone ,but the sound from modem to …

0
42
Member Avatar for coroll

Hi!, when im trying to execute following code.i get this error.can any one help me to make it correct. java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression. at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source) at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source) at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(Unknown Source) at sun.jdbc.odbc.JdbcOdbcStatement.execute(Unknown Source) at sun.jdbc.odbc.JdbcOdbcStatement.executeQuery(Unknown Source) at SelectApp.main(SelectApp.java:18) this is my …

Member Avatar for java_programmer
0
197
Member Avatar for greenman626

I would like to know how to write code for a right circular shift aka lazy susan. Its an array with 10 elements let me show you and example first time throw array it prints 1,2,3,4,5,6,7,8,9,10 second time throw after right circular shift of 3 places for example it prints …

Member Avatar for jon.kiparsky
0
270
Member Avatar for sivaprakashm

how to retaining the value of combo box after page got refreshed Please give me any idea Need help thanks in advance

Member Avatar for NormR1
0
58
Member Avatar for charat

[CODE]import java.util.Scanner; public class FutureInvestment { public static void main(String[] args) { // Display name System.out.println("Programmed by "); Scanner input = new Scanner(System.in); // Prompt user to input investment amount System.out.print("Enter an investment amount: "); double investment = input.nextInt(); // Prompt user to input interest amount System.out.print("Enter an interest rate: …

Member Avatar for WargRider
1
141
Member Avatar for Xessa

[code] String host = host_adress SshClient ssh = new SshClient(); ssh.connect(host,10022); System.out.println("ssh is connected--->"+ssh.isConnected()); PasswordAuthenticationClient passwordAuthenticationClient = new PasswordAuthenticationClient(); passwordAuthenticationClient.setPassword(password); passwordAuthenticationClient.setUsername(username); int result = ssh.authenticate(passwordAuthenticationClient); if(result != AuthenticationProtocolState.COMPLETE){ throw new Exception("Login to host failed"); } ssh.disconnect(); [/code] Above i just want to connect to an FTP server. We gave them …

0
58
Member Avatar for kerek2

Hi all... i need to do some study regarding how to count the multiple int that keep in by user like this :- "Please enter the integer : 1 3 5 66 88 (1+3=4+5=9+66=75+88=163 - the program will terminted cause exceed than 100) how to do ?...i stuck very long …

Member Avatar for stephen84s
0
105
Member Avatar for dahaka

Hi I was using the tutorial in the website [URL="http://jellebeuselinck.wordpress.com/2009/03/05/setting-up-smartgwt/"]http://jellebeuselinck.wordpress.com/2009/03/05/setting-up-smartgwt/[/URL] but when I run the application, the html page comes out blank. I am using GWT 2.0.3 and smartgwt 2.1 . Could it be a compatibility issue? Thank you

0
37
Member Avatar for kerek2

Hi, I need ur help regarding to do this program in java....i need to do program where user can input any number n this program will count until reach 100...if reach then the program will print out :---bla bla bla.....if not user can keep input the integer..how to to?...i'm dizzy …

Member Avatar for kerek2
0
141
Member Avatar for sweetyDoll

Hi! I'm a IT student. I need to have an simple java application of an online reservation system developed by using JSP, Servlets,Beans,JDBC, and Session Handling etc. I just need the java source codes. Please can anyone help me

-3
32
Member Avatar for darkocean

Hello everybody, I am c# developer but I have c# application and want to change it with Java because sometimes I have problem. I have 7 modems and my clients send package to my application and I want to listen it with thread ans produce an answer to them. I …

Member Avatar for Jayavardhan
0
114
Member Avatar for Dokka

Hi! I need [B]create a class[/B] to represent a "rock". When a rock object is created it should have print out a message to the console saying: "Rock 1 created". I should have a field that contains the rock's [B]weight[/B], methods to [I]set[/I] and [I]get[/I] the weight and method to …

Member Avatar for tong1
0
267
Member Avatar for g2gayan

Hey ! :) Below is my code for a about page ! i need to load a image instead of suing drawString to draw the image ! :icon_redface: what i need to do is to load a jpg and center it to screen ! can any1 help me to modify …

Member Avatar for g2gayan
0
137
Member Avatar for Web_Sailor

Hi gurus's :cool: I have got an actionListner in my code. The problem is that when I try to set my JLabel as true it does not work and does not show up in the GUI ? :@ [CODE]Button.addActionListener( new ActionListner(){ public void actionPerformed(ActionEvent e){ label.setVisible(true); myFunction() //here's some timeconsuming …

Member Avatar for Web_Sailor
0
3K
Member Avatar for rogue005

I am doing a project using Java swing in Netbeans and I am using their in-built GUI generator thing. I have created a socket in one frame and i need to use the same object in another frame. these frames are present in the same package but are different classes. …

Member Avatar for Ezzaral
0
3K
Member Avatar for TheComputerGuy

I have to convert 2D into 2 of Diamonds. I can not use if statements. If the person enters 10C then it prints out 10 of clubs. I've contemplated trying taking the string length, taking the position end of the string and using the D,C,S,H in the switch statements But …

Member Avatar for TheComputerGuy
0
172

The End.