Posts
 
Reputation
Joined
Last Seen
Ranked #336
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
~140.18K People Reached
Interests
algorithms, music
PC Specs
E5200,Eizo FlexScan T57S,NetBeans IDE Win.XP
Favorite Tags
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
984
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
273
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
202
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
122
Member Avatar for julylee06
Member Avatar for julylee06
0
633
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
196
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
123
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
97
Member Avatar for ScubaSam

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

Member Avatar for iamthwee
-2
148
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
150
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
92
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
344
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
228
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
166
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
227
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
387
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
187
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
164
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
166
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
187
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
279
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
272