Posts
 
Reputation
Joined
Last Seen
Ranked #2K
Strength to Increase Rep
+6
Strength to Decrease Rep
-1
81% Quality Score
Upvotes Received
7
Posts with Upvotes
7
Upvoting Members
6
Downvotes Received
2
Posts with Downvotes
1
Downvoting Members
2
3 Commented Posts
0 Endorsements
Ranked #914
~18.1K People Reached
About Me

Developer

Favorite Tags
Member Avatar for sravan953

Hey guys, As the title says, I want to know how I can reverse the characters in a string, but retaining the placement of the words as such, here's the code I used: [CODE]class reverse { void reverse(String s) { int l=s.length(),j=0; String s1=""; for(;j<l;j++) { char a=s.charAt(j); if(a==' ') …

Member Avatar for JamesCherrill
0
606
Member Avatar for jooa

Hi, I'm trying to write some code that will draw a filled in black circle at the coordinates where the mouse is clicked. Here is what I have written so far, I can currently get the coordinates of the mouse click point but nothing is displayed. I also get an …

Member Avatar for Roberdus
0
4K
Member Avatar for peter_budo

I'm trying to get hang of custom events and listeners. I found example of single event-listener, but I'm curious how to extend from single method to multiple that are related. [code=Java]public interface CountListener{ public void countEvent(int count); public void multiplyEvent(int multi); }[/code] [code=Java]public class Counter implements CountListener{ public void countEvent(int …

Member Avatar for svedrenne
0
3K
Member Avatar for nipponsahore

Hey .. Everyone ... I'm now to java .. I'm trying to figure out .. how everything fits together .. well .. i have a project that I'm working on .. .. basically it a type of quiz working on java .. where a user takes a simple MCQ quiz …

Member Avatar for nipponsahore
0
176
Member Avatar for Andy_Parr

Hi, I'm writing code for a graphical map of a shopping center. Whilst writing the code I realised it would be simpler to be able to draw objects using "names" instead of values. E.g. g.drawRect(Asda); instead of g.drawRect(100,100,40,40);. Is this possible? I have tried writing various classes but I can't …

Member Avatar for JamesCherrill
0
570
Member Avatar for aro_kai

My code is : [CODE] public final class Pixels{ BufferedImage img=null; public int w,h; public Pixels(){ try { // Read from a file File file = new File("1.jpg"); img = javax.imageio.ImageIO.read(file); } catch (IOException e) { } } public void checkfunction(){ h=img.getHeight(); // errorpoint w=img.getWidth(); } [/CODE] Errors: Exception in …

Member Avatar for aro_kai
0
144
Member Avatar for yap_1991

Hi, Im creating a GUI however i'm experiencing some difficulties. I want to have a text field and a button both placed inside a radiobutton. I've tried inputting ONLY the button, but the button is not displayed when i run the codes. Would be good if light could be shed, …

Member Avatar for di2daer
0
166
Member Avatar for hatux

Can somebody enlighten me why do i get an exception ? code is over here : [CODE] import java.io.InputStreamReader; import java.util.*; public class ObtainKey { public static void KeyAnalyzer(String input) { int idx = 0; int tokenCount; String inputArr[] = null; StringTokenizer st = new StringTokenizer(input); tokenCount = st.countTokens(); for …

Member Avatar for hatux
0
127
Member Avatar for ponens

Hi I'm new to Java, I'm trying to convert standard time to Unix time so I can use that data in Max/MSP (to modulate a tone) eventually I will allow this program to take a text file of ordinary times and write to a text file the converted Unix times …

Member Avatar for di2daer
0
128
Member Avatar for NewOrder

[CODE]import java.awt.Color; import java.awt.DisplayMode; import java.awt.Font; import javax.swing.JFrame; class GameStation extends JFrame{ public static void main(String [] args){ DisplayMode dm=new DisplayMode(800, 600, 16, DisplayMode.REFRESH_RATE_UNKNOWN); GameStation game=new GameStation(); game.run(dm); } public void run(DisplayMode dm) { setBackground(Color.PINK); setForeground(Color.WHITE); setFont(new Font("Arial", Font.PLAIN, 24)); Ex7 s=new Ex7(); try{ s.setFullScreen(dm, this); try{ Thread.sleep(5000); }catch(Exception ez){} …

Member Avatar for NewOrder
0
325
Member Avatar for gampalu

Hi, I am trying to load an image into an applet, however unsuccessfully. What's wrong here? [CODE]package sess31; // Import the AWT graphics package import java.awt.*; import java.applet.*; public class myownapplet extends Applet { Image image; public void init() { // Load image //image = getImage(getDocumentBase(), "show14.gif"); } public void …

Member Avatar for Alimuzzaman
0
684
Member Avatar for sselwyn

I am trying to write a recursive method to print an increment of a number of asterisks specified. triangle(5) would print this: * ** *** **** ***** However, the code I wrote seems to do the opposite and I'm not sure how to reverse it although I tried and it …

Member Avatar for di2daer
0
118
Member Avatar for akulkarni

I wish to create an application using swing to update data to the database. I will need three buttons add, modify and delete. i have so far created JDBC connection with Ms acess. i have also created a textfield where i will enter data like this... [code=JAVA] import java.awt.*; import …

Member Avatar for akulkarni
0
240
Member Avatar for sony1988.sc

i want to remove 0 from an integer array.like if i have an array having element 2 2 1 1 1 0 1 1 2 1 0 1 ,i want this as 2 2 1 1 1 1 1 2 1 1,plz help me

Member Avatar for Jocamps
0
117
Member Avatar for gitech

Hai Friends, Iam using canvas class in my J2ME progrm,it does show full screen view in mobile, i want to show j2Me form to full mobile screen, please help me for this problem.

Member Avatar for peter_budo
0
380
Member Avatar for javapal

Can anyone teach me on how to create a program that counts spaces entered in a string.....

Member Avatar for mrnutty
0
96
Member Avatar for locked_twilight

This is a working program. But there is a logical error. Try this with the calculator: Press 2,M; Press R,*,2; Press R,*2; The output in the same order must be: 2 2*2 = 4 2*2 = 4 but the third one outputs 88 instead. M stands for Memory, it stores …

Member Avatar for locked_twilight
0
131
Member Avatar for locked_twilight

package MyJava; //change package name according to what the name of the package //the class would be installed to import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.io.*; public class [B]Calculator[/B] extends JFrame implements ActionListener{ private JTextField displayText = new JTextField(30); private JButton[] button = new JButton[16]; private String[] keys = …

Member Avatar for locked_twilight
0
936
Member Avatar for kat1

I am using java.io package in my j2me programe in order to use PrintWriter but package does not show PrintWriter option nor it shows BufferedReader option , why this happen ??i do not know.if any one knows the solution plz tell me.is it require any specific library???? plz help me …

Member Avatar for sincerelibran
0
104
Member Avatar for emilio

hi i have a j2me application with a display set to Canvas. when i try to change the midlet's display to another Canvas using the following command: Display.getDisplay(this).setCurrent(Canvas2); nothing happens. how can i efficiently change a display to another Canvas ?

Member Avatar for peter_budo
0
219
Member Avatar for JameB

Hello, I am new to Java programming and I just got the NetBeans IDE. One problem that I've been having with Java is the input. [code=java] package learning; public class Main { public static void main(String[] args) { int num1 = 0, num2 = 0; cin >> num1 >> num2; …

Member Avatar for JameB
0
146
Member Avatar for buchanan23

I am trying to set up 4 buttons that will move through my array in the GUI. I am entering 2 items and telling the GUI to spit out the 2nd record. If I can just figure out how to get the "First" button to work, I think I can …

Member Avatar for buchanan23
0
2K
Member Avatar for KirkPatrick

Alright I am having my program read two text files (in csv format) and once it reads them, I am wanting it to do a check to see if two columns match, if they do I want it to write it to a new file. I have coded it, but …

Member Avatar for BestJewSinceJC
0
706
Member Avatar for jds_14
Member Avatar for Acidburn

Hey guys, Is it possible for a J2ME application to access the devices phonebook? I've been googling but nothing much as turned up. John

Member Avatar for peter_budo
0
80
Member Avatar for anusha88

i want to create a moving graph whose y value progresses with the slider value.i am confused whether to implement it using JFreechart.Is there a simpler method? How should i go about doing this?

Member Avatar for di2daer
0
185
Member Avatar for kg4cxl

New to Java and need some help...I am getting several Errors and I am not sure why here is the code and the error messages: [Code] import java.io.*; import java.util.Scanner; import javax.swing.JOptionPane; import java.util.*; import java.text.*; import java.lang.*; import java.math.*; import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.net.URL; public class …

Member Avatar for di2daer
0
170
Member Avatar for lakshay

Hi JavaExperts I have done few program in Java using Bit wise AND OR operator... But Not getting the proper output or May be I am doing something wrong Can any body explain why I am getting output class Bit { public static void main(String args[]) { System.out.println(010|4); } } …

Member Avatar for llemes4011
0
105
Member Avatar for rizillion

i need to how to give codings to buttons that are present in confirm dialog box. For Example if there are two buttons as "YES" and "NO" and if i click "YES" then the program should close. If i click no then th dialog box should return to the program. …

Member Avatar for peter_budo
0
156
Member Avatar for akulkarni

i am getting run time error as provided in title my code is [code] class maxstring { public static void main(String args[]) { String s1="nikhil is a good boy"; int d;int x=0; d=s1.length(); String[] s2=new String[d]; char ch; for(int i=0;i<=d-1;i++) { ch=s1.charAt(i); if(ch==' ') { s2[x]=s1.substring(x,i-1); x=i+1; } } String …

Member Avatar for akulkarni
0
138