35,618 Topics

Member Avatar for
Member Avatar for sivakumarl

Hi Friends, I want to convert given String of any language to Unicode.Please solve my porblem friends. Thank you cheers -------- siva

Member Avatar for peter_budo
-1
633
Member Avatar for MA1779

Can somebody please show me what the rest of this code should look like. I have about 90% of it so far. I have the GUI, but need help with the rest. Here is the Link to my code and the question to the problem is below. I thought it …

Member Avatar for peter_budo
0
142
Member Avatar for bhavna13

[CODE]public class duplicate { public static void main(String[] args)throws IOException { System.out.println("Enter words separated by spaces ('.' to quit):"); Set<String> s = new HashSet<String>(); Scanner input = new Scanner(System.in); while (true) { String token = input.next(); if (".".equals(token)) break; if (!s.add(token)) System.out.println("Duplicate detected: " + token); } System.out.println(s.size() + " …

Member Avatar for christeenajose
0
182
Member Avatar for bangor_boy

[CODE]private void getPreviousButtonActionPerformed(java.awt.event.ActionEvent evt) { List<Tweet> listOfTweets = remoteBean.getMoreTweets(5); StringBuilder displayStringBuilder = new StringBuilder(); if(listOfTweets != null) { for (Tweet tweet : listOfTweet) { displayStringBuilder.append(tweet.toString() + "\n"); } textArea.setText(displayStringBuilder.toString()); } } [/CODE] As it stands when i run the code that this method is in and enter a number of …

Member Avatar for mKorbel
0
145
Member Avatar for ecclesiastes3:1

I'm newbie in java, can you help me to this code. the image needs to move diagonally [CODE]public void actionPerformed(ActionEvent e) { x += 3; if (x > 600) { y = random.nextInt(600); x = random.nextInt(-45); star.setX(x); star.setY(y); }[/CODE]

Member Avatar for NormR1
0
120
Member Avatar for raghujosh

How can I pass multiple values from a JSP to a servlet using an hyperlink. Following is my code [CODE]<div style="width:500px;height:20px;border:2px solid blue; padding-top:25px; padding-left:40px; padding-right:20px; padding-bottom:10px;"> <jsp:include page = "/Alphabet.jsp"/> </div> <a href = "cart.jsp"><img src="shopping_cart.jpeg" width=50 Height=75 alt="Shopping Cart" border="0" style="float:right;"></a> <%@ page import="com.classes.chemical.*, java.util.ArrayList" %> <td width …

0
141
Member Avatar for vinaysrk919

i found error in the following code.... [CODE]import java.sql.*; import java.util.*; class search { public static void main(String args[]) throws Exception { Connection con=null; ResultSet rs=null; Statement st=null; Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con=DriverManager.getConnection("jdbc:odbc:oracle","user","vinay"); String s="select *from student where roll=?"; st=con.prepareStatement(s); rs=st.executeQuery(); Scanner inp=new Scanner(System.in); System.out.println("Enter roll to search"); int r=inp.nextInt(); st.setInt(1,r); while (rs.next()) …

Member Avatar for NormR1
0
115
Member Avatar for nuevoenjava

I want to create a patient appointment schedule desktop app with an oracle database. Basically its going to be 2 computers with the app and one of them is going to have the database service running. Ok so my question is... should i do it in eclipse or netbeans? am …

Member Avatar for nuevoenjava
0
106
Member Avatar for llemes4011

Hi all, I'm working on a C++ app that needs to communicate with a server. I was wondering if it would be possible to use Java for the Server, and C++ for the Client. I'm assuming it should work (without the use of JNI) because TCP packets are TCP packets, …

Member Avatar for llemes4011
0
265
Member Avatar for sachinpkale

hi, I want to run the command using java code echo $PATH I used Runtime.getRuntime().exec() for this, but it returns outputp as : $PATH. I know I can get the value of PATH variable using System.getProperty() but I want to use particularly "echo" command. How can I do it?

Member Avatar for JeffGrigg
0
173
Member Avatar for ayas

I'm trying to merge cells of the same row and after researching i found this link: [url]http://codeguru.earthweb.com/java/articles/139.shtml[/url] I downloaded the files and tried using it but it didn't run because of an error I don't understand:S can anybody help??

Member Avatar for Aviras
0
106
Member Avatar for baby_c

Hello Friends.. need a help with Merge Sort I tried to implement Merge Sort using Java language..I followed Introduction to Algorithm book for the algorithm.. but the code generates errors.. please can anyone explain this to me.. why these errors pop-up ?? [CODE] package test; import java.util.Random; public class mergeSort …

Member Avatar for JamesCherrill
0
382
Member Avatar for abhinavM

I have a set of radio buttons.These radio buttons are associated with some questions for survey.I also have a Submit button.I want that as soon as I click the Submit button, the application should read the status of radio buttons.But I am unable to figure out a way of doing …

0
110
Member Avatar for Whilliam

Hello guys.. Im very new to java. Im using netbeans 7.0 and JDK 1.7. Im an IT student. My teacher said that we must use only Java DB (don't know why) for our database. I've already made a program. It will display all the contents of a table. My problem …

Member Avatar for Anuradha Mandal
0
191
Member Avatar for domifa621

I have been fighting this but I am not winning. So far I have looked up a ODBC JDBC connection string to connect to my simple database to java without any success. Firstly; I replaced 32bit MS Access 2010 with 64x one. Secondly; I installed all available updates sp1 and …

0
89
Member Avatar for anandunics

Hi All, I have problem while using prepared statements. i have a "Select" query in a xml & i m reading it through XML parser & supplying inputs throughs prepared statements. When i execute i am not getting desired results. Below is the snippet : String res=query (query is String …

0
81
Member Avatar for lena1990

hi all i want to add picture to my frame how i can do that i use this code ImageIcon image=new ImageIcon("f:\\a.jpg");

Member Avatar for Ezzaral
0
65
Member Avatar for Jaydenn

Using the basic principle in this code: [CODE] try { GraphicsEnvironment ge = GraphicsEnvironment .getLocalGraphicsEnvironment(); GraphicsDevice[] gs = ge.getScreenDevices(); BufferedImage[] screenshots = new BufferedImage[gs.length]; ImageWriter writer = null; Iterator<ImageWriter> iter = ImageIO.getImageWritersByFormatName("jpeg"); if (iter.hasNext()) writer = iter.next(); ImageWriteParam iwp = writer.getDefaultWriteParam(); iwp.setCompressionMode(ImageWriteParam.MODE_EXPLICIT); iwp.setCompressionQuality(0.1F); DisplayMode mode; Rectangle bounds; for (int i …

Member Avatar for JamesCherrill
0
218
Member Avatar for D3X

Hi guys, i have been able to get this transfer function to work but only with one account. i'm not too sure how to get it working for the other account also. Any help would be greatly appreciated. [CODE]static String doTransfer(String amount){ // Withdraw cash -- called from ATMWithdrawl String …

Member Avatar for JeffGrigg
0
131
Member Avatar for jnewbie

Hi guys, I'm working on a console based application and I'm struck in a control flow issue for driver class. Any assistance is appreciated. This method from the driver class call method from inventory class to search for a item that is stored in an arraylist. On query it return …

Member Avatar for JeffGrigg
0
124
Member Avatar for gman1991

ive been looking up, and their seems to be many way to read from a file. my question is, how do you read from a file. the file setup is like this.... the first line is a number(830) representing number of words, next lines are words.. the file looks like …

Member Avatar for Aviras
0
226
Member Avatar for anand01

hi all , I did a application in jsp servlet and ejb with mysql db .. how should i host in wweb server pls any one help me Thanks in advance Anand

Member Avatar for peter_budo
0
101
Member Avatar for sirlink99

I have this problem, that whenever I set the frame size using the setSize () method the size inside the frame is actually smaller, because the frame size is included in this dimension. My question is how would I make it so that the inside of the frame is the …

Member Avatar for JamesCherrill
0
148
Member Avatar for Majestics
Member Avatar for Majestics
0
213
Member Avatar for AhmedGhazey

Guys I ask if any one can help me . i have to write application which take images from web cam can anyone help me , by providing where i must read , as i googled it , and the results weren't good .

Member Avatar for harinath_2007
0
68
Member Avatar for venktech

I m developing a java app that will have a GUI to draw the graph and implements the graph coloring algorithm to colour the nodes. I started with JFrame and Canvas and could draw lines and circles with paint() and repaint methods.. The problem is repaint method erases the previous …

Member Avatar for venktech
0
368
Member Avatar for akasekaihime

can anyone help me correct and make my payslip work......how can I correct line 303,306 and 309.................. [CODE]import javax.swing.*; import java.awt.*; import java.awt.event.*; public class payslip3 extends JFrame implements ActionListener { private static int width=600; private static int height=300; private JLabel[] labelJL = new JLabel[18]; private JTextField[] textJT = new …

Member Avatar for hfx642
0
167
Member Avatar for betny

[CODE]public void readArguments(String[]args ) { String [] readArray = new String[ 10 ]; Scanner readscanner=new Scanner(System.in); // read values from keyboard into array System.out.println("Enter your arguments or type Exit to exit the loop"); for ( int i = 0 ; i < readArray.length ; i ++) { if(readArray[i] =="Exit" ) …

Member Avatar for hfx642
1
230
Member Avatar for dayghost

So, I've created a game. I want it to connect to a database to get some information. This is the problem I'm getting the console. [code] com.mysql.jdbc.CommunicationsException: Communications link failure due to under lying exception: ** BEGIN NESTED EXCEPTION ** java.net.ConnectException MESSAGE: Connection refused: connect STACKTRACE: java.net.ConnectException: Connection refused: connect …

Member Avatar for dayghost
0
242
Member Avatar for wonder_laptop

Dear All, i have been tugging my hair out for 3 days and i cant find the problem !!! im writing a code in Aglets, i have to classes, Master and SayItAglet [B][U][COLOR="Green"]Master.Java[/COLOR][/U][/B] [CODE]package simple; import com.ibm.aglet.*; import java.net.*; public class Master extends Aglet { private AgletContext thisContext = null; …

Member Avatar for ahmed0725
0
223

The End.