Posts
 
Reputation
Joined
Last Seen
Ranked #339
Strength to Increase Rep
+10
Strength to Decrease Rep
-2
98% Quality Score
Upvotes Received
51
Posts with Upvotes
49
Upvoting Members
33
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
16 Commented Posts
0 Endorsements
Ranked #198
~143.42K People Reached
Interests
algorithms, music
PC Specs
E5200,Eizo FlexScan T57S,NetBeans IDE Win.XP
Favorite Tags

388 Posted Topics

Member Avatar for LianaN

Write new class ie. ImageRectangle extends Rectangle and in single constructor put your BuferredImage and Rectangle parameters[CODE] public ImageRectangle(int x, int y, int w, int h, BufferedImage bi) { super(x, y, w, h); this.bi = bi; }[/CODE] Override Rectangle method[CODE]public boolean contains(Point p)[/CODE] write own method[CODE]public void drawImage(Graphics2D g2)[/CODE] Image …

Member Avatar for ivy.inc.Hugh
1
2K
Member Avatar for shakssage

You have 4 possible directions: N,E,S,W. Implement them as boolean values. In your code N=true, E=S=W=false. Inside method check this N,E,S,W values. [CODE=java]public void run() { while (true) { this.requestFocus(); i++; if (N) { sLeftY -= 5; car.changePositionY(sLeftY); // same as your current method car.changePosition } else if (E) { …

Member Avatar for RuhiAngel
0
2K
Member Avatar for spoch

line 201-209 you lose the consistency between the content of the array "numbers" and the values of variables "a,b,c,d".

Member Avatar for JamesCherrill
0
2K
Member Avatar for Hanyouslayer

[CODE] public static void main(String[] args) { Polynomial polyAdd = new Polynomial(); System.out.println(polyAdd.toString()); }[/CODE] [QUOTE]run: Exception in thread "main" java.lang.NullPointerException at Hanyouslayer.Polynomial.toString(Polynomial.java:162) at Hanyouslayer.Polynomial.main(Polynomial.java:213) Java Result: 1 [/QUOTE] Why it gives error, where are defaults...

Member Avatar for JamesCherrill
0
1K
Member Avatar for bangor_boy

[CODE] private class BallPanel extends JPanel { private Paddle paddle; /** Creates a new instance of BallPanel */ public BallPanel() { paddle = new Paddle(FRAME_WIDTH, FRAME_HEIGHT); } public void paintComponent(Graphics g) { super.paintComponent(g); paddle.draw(g); System.out.println( "BallPanel:" + new Dimension(this.getWidth(),this.getHeight())); System.out.println( "paddle:" + paddle.area()); } /* public Dimension getPreferredSize() { return …

Member Avatar for JamesCherrill
0
282
Member Avatar for vartikachandra

Read line from file. String line="My name is abc.I am fbvnfdl.I am a girl."; There are three dots. Write method tokenize, using new StringTokenizer(".") Dot as delimiter. Result: 1. "My name is abc" 2. "I am fbvnfdl" 3. "I am a girl" Write 3. to file with dot at end. …

Member Avatar for stultuske
0
208
Member Avatar for cig_buttz

Use class [B]java.lang.Integer[/B]. There are 3 static methods with [B]radix[/B] word. (radix can be [2,...,36]) ...or better yet, write a program that reflects the manual methods carried out on paper.

Member Avatar for josephbeluan
0
127
Member Avatar for julylee06
Member Avatar for julylee06
0
651
Member Avatar for Xrrak
Member Avatar for Majestics
Member Avatar for ErickN

for [I]input[/I] apply [I]CaretListener[/I] [CODE] // input.addActionListener(this); input.addCaretListener(new CaretListener() { @Override public void caretUpdate(CaretEvent e) { System.out.println(e); // TODO } });[/CODE]

Member Avatar for NormR1
0
208
Member Avatar for sirlink99

Set the names for sliders [B]jSlider1.setName("waveSlider1"); ...[/B] and inside [B]stateChanged[/B] method simply write [B]if ("waveSlider1".equals(source.getName())){[/B]

Member Avatar for sirlink99
0
126
Member Avatar for kasraluckblack
Re: Q

When I do not have a file [U]account.txt[/U] program gives me stack overflow. The first use of your program should give the possibility to create new accounts.

Member Avatar for quuba
0
101
Member Avatar for ScubaSam

ScubaSam, ensure that all the set-methods inside Appointment.java are correctly written.

Member Avatar for iamthwee
-2
151
Member Avatar for sariberri

If the system showed errors, show them. possible cases: -Your text file contains only single row (check this in line 34) [CODE]//34. System.out.println(row * 5 + column);[/CODE] - line 47 introduces an unwanted side effect (comment this line).

Member Avatar for quuba
0
159
Member Avatar for apanimesh061
Member Avatar for kukuruku

You can use [I]while (true) {...}[/I] condition. And itself modify the condition out of the loop.

Member Avatar for quuba
0
94
Member Avatar for themanman

Adding a Table to a Container [URL="http://download.oracle.com/javase/tutorial/uiswing/components/table.html"]http://download.oracle.com/javase/tutorial/uiswing/components/table.html[/URL] SimpleTableDemo.java as example

Member Avatar for mKorbel
0
351
Member Avatar for tultul

Inside `public void addComponentToPane(Container pane) {` method, initialize `cl` variable, same way as in the first line of `public void actionPerformed(ActionEvent e){` method. Look at the runtime exceptions, base info for you: run: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at WeatherDelegator$1.actionPerformed(WeatherDelegator.java:60) at javax.swing.Timer.fireActionPerformed(Timer.java:292)

Member Avatar for quuba
0
2K
Member Avatar for saisakthi

[B]CoMIRVA[/B]: Collection of Music Information Retrieval and Visualization Applications -developed and maintained by Markus Schedl [URL="http://www.cp.jku.at/people/schedl/Research/Development/CoMIRVA/webpage/CoMIRVA.html"]http://www.cp.jku.at/people/schedl/Research/Development/CoMIRVA/webpage/CoMIRVA.html[/URL]

Member Avatar for quuba
0
244
Member Avatar for emc22

Method [I]getPointsOf[/I] modifies your [I]origin[/I] instance of Point class (lines 32,33) If it is unnecessary use a local "clone". [CODE] public static ArrayList<Point> getPointsOf(int x, int y, Point orig) { Point origin = new Point(orig);/////////////////// ArrayList<Point> options = new ArrayList<Point>(); //System.out.println("=== " + origin.x + " " + origin.y); while …

Member Avatar for emc22
0
169
Member Avatar for fragtech

"vertical retrace artifacts come from rendering to the screen at the same time as the screen is being refreshed from video memory" [URL="http://today.java.net/pub/a/today/2006/02/23/smooth-moves-solutions.html"]http://today.java.net/pub/a/today/2006/02/23/smooth-moves-solutions.html[/URL] [URL="http://www.filthyrichclients.org/"]http://www.filthyrichclients.org/[/URL]-Chapter 13, Smooth Moves

Member Avatar for quuba
0
230
Member Avatar for Ssnowlin

LexicalAnalyzer: method [B]public TokenType nextToken()[/B] line 26 [I]while (true)//there is a token[/I] method [B]public char nextChar()[/B] line 250-254 [I]else // end of file[/I] 1. first solution: change constant "true" to the variable, and set to false when "end of file" was detected, 2. second: change the [I]state[/I] variable to for …

Member Avatar for Ssnowlin
0
390
Member Avatar for sourabh17

I recommend examples from the book:[URL="http://filthyrichclients.org/"]http://filthyrichclients.org/[/URL] download Examples Chapter 8, Image Processing go to CustomImageOp and GraphicsUtilities - very useful methods [CODE] public final float[] FILTER_3x3 = { 0.1f, 0.1f, 0.1f, 0.1f, 0.4f, 0.1f, 0.1f, 0.1f, 0.1f };[/CODE]

Member Avatar for sourabh17
0
189
Member Avatar for WolfShield

Your code should like this: [CODE]package macey; /** * @author Mike */ import java.awt.*; import java.awt.event.*; import javax.swing.*; public class NormCalcDev implements ActionListener { private JTextField calcDisplayF; public NormCalcDev() { // Content Pane ... calcDisplayF = new JTextField(); // calcDisplayF.setEnabled(false); ... } public void actionPerformed(ActionEvent e) { if (e.getActionCommand().equals("1") != …

Member Avatar for WolfShield
0
166
Member Avatar for desert564
Member Avatar for gingerfish

[CODE] boolean all() { //&& int counter = 0; for (int j = 0; j < errorList.length; j++) { if (errorList[j] == 0) { counter++; } } return counter == errorList.length; } boolean oneOf() { //|| for (int j = 0; j < errorList.length; j++) { if (errorList[j] != 0) …

Member Avatar for gingerfish
0
174
Member Avatar for Acklox

Look at previous post [URL="http://www.daniweb.com/forums/thread350550.html"]http://www.daniweb.com/forums/thread350550.html[/URL]

Member Avatar for JamesCherrill
0
194
Member Avatar for flyingcurry

[CODE] static int test2(int T, int[] M, int LIMIT) { System.out.println("LIMIT " + LIMIT); System.out.println("T " + T); System.out.println("===="); int B = 2; int H = B / 2; while (LIMIT > B) { System.out.println("B " + B); int counter = 0; if (T >= B) { for (int i …

Member Avatar for quuba
0
287
Member Avatar for Phil++

[URL="http://www.realapplets.com/tutorial/ActionExample.html"]http://www.realapplets.com/tutorial/ActionExample.html[/URL]

Member Avatar for Ezzaral
0
278
Member Avatar for cybrix101

simply check inside [B]hit[/B] method [CODE] System.out.println(mousePoint); System.out.println(myPicture.area());[/CODE]

Member Avatar for Ezzaral
0
150
Member Avatar for gekkoswave
Member Avatar for emcyroyale

[CODE]import java.util.*; public class testHomework { public static void main(String[] args) { // common list for Homework type objects // used List as interface type List<Homework> al = new ArrayList<Homework>(); // MyMath math = new MyMath(); al.add(math); // MyScience science = new MyScience(); al.add(science); // MyEnglish english = new MyEnglish(); …

Member Avatar for quuba
0
208
Member Avatar for wonder_laptop

Look at the example inside java jdk package [B]jdk1.7.0/demo/applets/GraphLayout/example4.html[/B] Earlier versions also include this example.

Member Avatar for Taywin
0
130
Member Avatar for magikkar2nd
Member Avatar for Phil++

Line 6. [I]numForMem[/I] should be declared outside an [I]actionPerformed[/I] method. Now [I]numForMem[/I] is a local.

Member Avatar for quuba
0
88
Member Avatar for carlitosway17

Lines 14,15 and 20,21. LocalVariableHidesMemberVariable ! result totally counterproductive

Member Avatar for quuba
0
240
Member Avatar for Mykd

L24-29 this is initialization When you creates (in main method) new instance of ExitJoke the first executed code is L24-29. L26 here is "new ExitJoke", this executes code in L24. Then your program work in loop L26-L24-L26.... Move code L24-29 to end of main constructor

Member Avatar for Dev Ubhare
0
202
Member Avatar for doyler

I like posts like this. It is like checking to Newton's law of the apple falling to head from a tree. Graph is also needed to compare the results with a certain amount of starts. First look, very cursory: [B]mutChance[/B] is absence in calculations. Why? (my English reflects the degree …

Member Avatar for doyler
0
136
Member Avatar for javagiek

I do not know eclipse. look at compile flag `-Xlint:deprecation` or change deprecated constructor `@Deprecatedpublic StreamTokenizer(InputStream is)` to other: Line 25 replace withFileInputStream is = new FileInputStream(file); Reader r = new BufferedReader(new InputStreamReader(is)); ReadFile rt = new ReadFile(r); where ReadFile(Reader in) { super(in); }

Member Avatar for ztini
0
104
Member Avatar for black_berry

recycled GUI: Your original version need only one change in line 98 Replace [B]new Help();[/B] with [B]Help.main(null);[/B] (Change name [B]main[/B] to any other)

Member Avatar for quuba
0
349
Member Avatar for thes0mething

used equals on incompatible types (JButton vs. String) use Plan[0][1].getText().equals("O")

Member Avatar for thes0mething
0
152
Member Avatar for soUPERMan

use SITE SEARCH: [URL="http://www.daniweb.com/forums/search.php"]http://www.daniweb.com/forums/search.php[/URL] keywords: [B]infix postfix[/B] read a book: [URL="http://www.brpreiss.com/books/opus5/"]http://www.brpreiss.com/books/opus5/[/URL]

Member Avatar for lucky_Username
0
975
Member Avatar for Monkeeboy

OOP requires elevation to a higher level of abstraction, while maintaining the natural rules of everyday life. [CODE]package frog; /* * InputPosition.java * * Created on 2011-01-16, 22:22:41 */ /** * * @author j3c */ public class InputPositions { private static final int START = 1; private static final int …

Member Avatar for Monkeeboy
0
176
Member Avatar for Amuthaalbe

wrong type [B]TYPE_3BYTE_BGR[/B], ask sourceImage for type, use it, or comment line [B]destImage= new BufferedImage(sourceImage.getWidth(),sourceImage.getHeight(),BufferedImage.TYPE_3BYTE_BGR);[/B] more info ImageProcessing\ImageOps example [URL="http://filthyrichclients.org/"]http://filthyrichclients.org/[/URL] or [URL="ftp://ftp.helion.pl/przyklady/efgran.zip"]ftp://ftp.helion.pl/przyklady/efgran.zip[/URL]

Member Avatar for Amuthaalbe
0
544
Member Avatar for rushhour2

RB_Consumer is not waiting for message (from method [B]public synchronized void put(Element item)[/B]). Prints immediately null value of item. Try set as default field [B]private Element item = new Element("too fast");[/B] to see. To simply trace the flow, put before all [B]put[/B] methods line for example [CODE] public synchronized void …

Member Avatar for quuba
0
147
Member Avatar for pulsar_sitra

Use The Reflection API [CODE]http://download.oracle.com/javase/tutorial/reflect/class/classMembers.html[/CODE]

Member Avatar for quuba
0
100
Member Avatar for tyson.crouch

Write first separate specialized class [B]SinglePlan [/B]with constructor [CODE]SinglePlan(HSSFCell[] allCells, HSSFSheet tempSheet, HSSFRow row) { setOnePlan(allCells, tempSheet, row); } // and method private void setOnePlan(HSSFCell[] allCells, HSSFSheet tempSheet, HSSFRow row) { ///... }[/CODE] parametrize method [B]setOnePlan[/B] you know size of HSSFCell[] allCells ! your base method should looks like [CODE] …

Member Avatar for quuba
0
232
Member Avatar for mindbend

NewClass: set same Dimension for minimum/maximum/preferred size of JPanel MainForm: no need extends JPanel, no need setSize for testFrame use GridLayout and pack() method

Member Avatar for mindbend
0
2K
Member Avatar for galva
Member Avatar for Democles
0
143

The End.