32,199 Topics
| |
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 … | |
[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 … | |
kindly discuss about the scanner class and its importance | |
//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 … | |
[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 … | |
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? | |
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. … | |
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 … | |
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 … | |
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 … | |
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 … | |
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) { … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
how to retaining the value of combo box after page got refreshed Please give me any idea Need help thanks in advance | |
[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: … | |
[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 … | |
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 … | |
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 | |
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 … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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. … | |
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 … |
The End.