32,204 Topics

Member Avatar for
Member Avatar for sbharathind

public static void nonRecursiveInorder(Node node) { Stack<Node> st=new Stack(); st.push(node); Node temp; while(!st.isEmpty()) { temp=st.peek(); if(temp.left!=null && temp.left.visited==false) st.push(temp.left); else { if(temp.left==null && temp.right!=null && temp.right.visited==false) { System.out.print(" "+temp.value); temp.visited=true; st.pop(); st.push(temp.right); } else { if(temp.left!=null && temp.left.visited==true && temp.right!=null && temp.right.visited==false) { System.out.print(" "+temp.value); temp.visited=true; st.pop(); st.push(temp.right); } else …

Member Avatar for sbharathind
0
219
Member Avatar for Murphyv10

Hey Guys , can i just get some help with my dialog box , a sterr in the right direction wil be brillant . Thanks guys import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.ButtonGroup; import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JDesktopPane; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; import javax.swing.JOptionPane; …

Member Avatar for stultuske
0
195
Member Avatar for Leo G

Just looking at my entries in my Process Explorer and I noticed the JAVA updater was in there. I turned that off. So I went back to the JAVA console and indeed it was on. I turned it off and it gave me a warning and again I chose to …

Member Avatar for Leo G
0
182
Member Avatar for jeffbeck8

Hi, I have a working program and I need to answer the following questions: 1:where was polymorphism was used in this application? 2:identify where overriding or overloading was used in this application? I belive overriding is used by the Runnable method to override the run() method. Would that be a …

Member Avatar for jeffbeck8
0
297
Member Avatar for Hameeda0410

HEllo everyone... My project consists of drawing a road two lane road using grahipcs the code snippet below is for drawing the road however if someone can help me in executing theses codes on an interface woud be great because i dont know how to do it Cheers public Road(int …

Member Avatar for JamesCherrill
0
916
Member Avatar for neondroid

new to I.T. need help about the problem analysis ,algorithm design, formatting the output package gasolinestation; import javax.swing.JOptionPane; public class GasolineStation { public static void main(String[] args) { float total, money; String yesno; JOptionPane.showMessageDialog(null, "Welcome to Gasoline Station!"); do { String select = JOptionPane.showInputDialog(null, "1 = Diesel .................... $ 39.00\n" …

Member Avatar for stultuske
0
270
Member Avatar for JamesCherrill

Just a quick heads-up, especially for anyone using Java in their web browser. There's a "widely exploited" vulnerability in Java that could allow bypassing normal security when a Java applet is run silently upon visiting a web site. (ie It's a bad one). Users are being widely advised to disable …

Member Avatar for harinath_2007
3
173
Member Avatar for DyCE

Hello if anyone can help I would like to know why I get this error when executing.. exception in thread "main" java.lang.NuSuchMethodError: main [code] import java.awt.*; import java.awt.event.*; import javax.swing.*; public class GridLayoutFrame extends JPanel { // These are the components private JButton FindB,AddB,RemoveB; private JLabel theOne,theTwo,theThree,theFour,studentID,theMidTerm,theMidterm,theFinal1,theFinal2,FinalG1,FinalG2,FGrade2; private JList studentNumbers; …

Member Avatar for stultuske
0
451
Member Avatar for jim.keele.7

Hi there everyone, I have a bit of a problem I am hoping you can help with. This is for an assignment, and I know I can finish the final calculations for my tax program if I could just pass my 2 variables from previous methods into the final method …

Member Avatar for bguild
1
179
Member Avatar for dreamslct

Hi everbody, Seen posts saying simple dictionary in Java. Thought of sharing something may be useful for others. Here is a simple code if anyone interested. import java.util.*; public class Dictionary { public static void main(String[] args) { Map <String, String> dictionary; dictionary = new TreeMap <String , String>(); Scanner …

Member Avatar for dreamslct
0
345
Member Avatar for amt_muk

Hello, I was trying to make a client-server application using java orb. Server was fetching data from database and passing them to client. The client was getting an exception for large numbers of rows (say, 50K). Jan 15, 2013 11:48:51 AM com.sun.corba.se.impl.transport.SocketOrChannelConnecti onImpl readFully WARNING: "IOP00410215: (COMM_FAILURE) Read of full …

0
55
Member Avatar for Hameeda0410

Hello I am a student of computer science year 3 and am doing my project on a **road design simulator**. I should be able to design a road on a java interface and simulate it with cars. Does anyone have an idea about how should i proceed with it?

Member Avatar for Hameeda0410
0
2K
Member Avatar for csk19

write a program to print the highest palindrome value that is the multiplication of two numbers lies between 100 to 1000.

Member Avatar for Taywin
0
592
Member Avatar for Madnar

I'm supposed to write an application that calculates the Body Mass Index (BMI) for the user, using centimeters for height, and kilograms for weight.. Basically, I'm stuck here.. I have no clue what I'm supposed to do next.. Or if it's even correct so far.. Any help? /*** This application …

Member Avatar for Taywin
1
213
Member Avatar for pro_learner

This is the code which i wrote.But when i input a word,it should search it and give the definition.I think there is a problem in while loop.But i can't solve it.Can u guys,plz check it? [CODE]import java.util.*; class dictionary { public static void main(String args[]) { Hashtable dict = new …

Member Avatar for dreamslct
0
223
Member Avatar for dreamslct

Hi everybody, Just wondering if it is possible t hat we can change the text size in balloon or bubble message or whatever you call it the one we create useing "trayicon.displaymessage("message", "message", message.info);Highly appreciate if someone could help me out. Thanks.

Member Avatar for JamesCherrill
0
361
Member Avatar for techxaidz

PROBEMS: > The Library class would include data members such as ID, Date of acquisition, description, number of copies, title and **instance methods such addItem() and retrieveItem()** also accessor and mutator methods are needed to accecss data members. > User arrays to store library holdings. So here's my questions: **What …

Member Avatar for stultuske
0
524
Member Avatar for goutham.patnam

Hi, I am new to Java. Recently I developed one application for Uploading files to Shared drive. All files are Uploading properly but Checksum Of PDF files are mismatching. Someone please help me to fix this issue Thanks in advance.

Member Avatar for Taywin
0
149
Member Avatar for raj09cs42

hi i need the code to calculate the euclidean distance by reading a yeast dataset file when the calcute button is clicked it show the distance between different points in another frame

Member Avatar for JamesCherrill
0
124
Member Avatar for renmarkcerdan

This is my Problem, Please Help me :( The Library class would include data members such as ID, Date of Aquisition, descrition, number of copies, title and instance method such addItem() and retrieceItem() also accessor and mutator method aree needed to access data members. These are variables and methods common …

Member Avatar for azareth
-2
197
Member Avatar for amrita111

This is a part of my code. String name=sc.nextLine(); int no=sc.nextInt(); The problem is if I write sc.next() instead of sc.nextLine() then i can pass only "james" not "james watson". when i write sc.nextLine() then it takes integer not string.Why is it so? Please Help!!!

Member Avatar for JamesCherrill
0
130
Member Avatar for raj09cs42

hi i need to create a batch file when it is double click it should run the code

Member Avatar for stultuske
-1
122
Member Avatar for welshly_2010

having a little trouble trying to convert this pseudo code into python, could any help receiveFile () { lastblock := 0 newblock := 0 ; repeat repeat event := getFrameFromUDP(m) ; case event of data : newblock := getBlockNoFromFrame(m) ; transmitAckOverUDP(newblock) | timeout: transmitAckOverUDP(lastblock) esac until newblock==lastblock+1 ; lastblock = …

Member Avatar for vegaseat
0
7K
Member Avatar for wtosh

/ // Clipper.java // // /** * Object for performing clipping * */ public class clipper { /** * clipPolygon * * Clip the polygon with vertex count in and vertices inx/iny * against the rectangular clipping region specified by lower-left corner * (x0,y0) and upper-right corner (x1,y1). The resulting …

Member Avatar for Taywin
0
621
Member Avatar for trishtren

Hello, Iv recently just started using javafx and i am struggling finding a way to access data from a controller class, at the moment i can do it using method.invoke, however it seems like more of a hack than a legitimate clean option of accessing data from a controller class. …

0
74
Member Avatar for bettybarnes

Hello I'm planning to create a java application which calculates ip address just like this http://jodies.de/ipcalc?host=172.168.0.2&mask1=23&mask2= can you suggest an existing library, or tutorials so I could begin developing this?

Member Avatar for Taywin
0
163
Member Avatar for amrita111
Member Avatar for amrita111
0
136
Member Avatar for angel06

Hello I'm currently working with my Java program here is my code: import java.util.Scanner; public class StringAct{ public static void main(String[]args){ Scanner inp=new Scanner(System.in); System.out.print("Enter string: "); String a= inp.nextLine(); if(a=="angel"){ System.out.print("Valid"); } else{ System.out.print("Not Valid"); } } } this program asks the user to enter a string, the string …

Member Avatar for angel06
0
142
Member Avatar for ambageo

HI! I want to write a constructor that will make a window (a frame). I want to be able to insert the height, width, position and window color. This is what I've written: public Window(String name, int height, int width,String c,String isActive,int PointX, int PointY){ setTitle(name); setSize(height,width); getContentPane().setBackground(Color.c); setLocation(PointX,PointY); setVisible(isActive.equals("active")); …

Member Avatar for ambageo
0
200
Member Avatar for jim.keele.7

Hi there everyone, I am a novice at java and this one has me stumped. This is the beginning of a tax calculator but I am getting irregular output from the getIncome() method. It starts fine, letting the user enter income figures, but on the third income entry or so, …

Member Avatar for jim.keele.7
0
139

The End.