32,199 Topics

Member Avatar for
Member Avatar for Majestics

How to keep look and feel of java program as classic windows style , even the style of the windows change to windows xp look, or aero look? I mean permenantly keeping classic look? Has any one has any idea? Thank you............... for any advice , help... :)

Member Avatar for Majestics
0
163
Member Avatar for sathya88

some commands working properly(notepad ,control(control panel))... but how to execute commands "dir" like that my code is ... [CODE] public class test1{ public static void main(String args[])throws Exception{ Runtime r= Runtime.getRuntime(); Process p1=r.exec("notepad");//working fine Process p2=r.exec("control");//working fine Process p3=r.exec("test1.java");//cannot run Process p4=r.exec("dir");// cannot run } } o/p: F:\studies\java\test>java test1 Exception …

Member Avatar for JamesCherrill
0
8K
Member Avatar for betny

[code=text]SET CLASSPATH_JARS=../../lib/log4j/log4j-1.2.14.jar SET BUILD_CLASS_DIR_IMPLEMENTATION=BUILD_LOCAL\implementation\build\classes SET RUN_CLASSPATH=%BUILD_CLASS_DIR_IMPLEMENTATION%;%CLASSPATH_JARS% SET CLASS_TO_RUN=chepsoft.micro.javadoc.workerapplication.WorkerApplication SET ARGUMENTS=Worker implementation by WorkerImpl ECHO CLASSPATH_JARS=%CLASSPATH_JARS% ECHO BUILD_CLASS_DIR_IMPLEMENTATION=%BUILD_CLASS_DIR_IMPLEMENTATION% ECHO RUN_CLASSPATH=%RUN_CLASSPATH% ECHO CLASS_TO_RUN=%CLASS_TO_RUN% java -classpath %RUN_CLASSPATH% %CLASS_TO_RUN% %ARGUMENTS% %1String name = "Bethuel", %2String workerType = "Monthly Employee", %3double salary = 22000d,[/code] if i want to pass the above variables from run.bat file …

Member Avatar for peter_budo
0
160
Member Avatar for mith_cool

Instance variable does mean you will get new value with every new object created of particular class rite? I tried it myself eg: [CODE]class simpleinstcheck { static int i; void incr() { System.out.println(i++); } public static void main(String args[]) { simpleinstcheck sc= new simpleinstcheck(); sc.incr(); simpleinstcheck sc1= new simpleinstcheck(); sc1.incr(); …

Member Avatar for JamesCherrill
0
172
Member Avatar for afaquemanzoor
Member Avatar for JeffGrigg
0
110
Member Avatar for yt0729

I am doing several choice box in JFrame.But i have some problems.Can anyone help me. 1)Currently doing a loop to add no1 until 50 into choice box.But it doesn't work. [CODE]int [] number = new int[50]; for(int i=0;i<50;i++) { number[i] = i; for(int i = 0;i<50;i++) { c1.add(number[i]); }[/CODE] 2)I …

Member Avatar for mKorbel
0
187
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
630
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
140
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
178
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
142
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
118
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
113
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
104
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
257
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
171
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
105
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
378
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
187
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
88
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
79
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
64
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
215
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
129
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
122
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
225
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
139
Member Avatar for Majestics
Member Avatar for Majestics
0
209
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
67
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
351
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
165

The End.