Douglas Braxton

Ranch Hand
+ Follow
since Jan 28, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Douglas Braxton

Ranch Hands Greenhorns Sherriffs; et. al.;
i finished my Java class last night and thanks to everyone's expert help i hopefully passed. if you lived nearby i would buy everyone in the saloon a beer!
thanks again.
14 years ago
polina and john
thanks for your help.
i implemented some of both your suggestions and eventually got it like i wanted it.
it now fills the poly with a pattern of small smiley faces.
doug
14 years ago
craig
thanks. i have been getting some deprecation warnings. i wonder if that is what these are referring to.
doug
14 years ago
how do i label the snap to tick marks on a JSlider with three tick marks
"RARE", "MED", & "WELL"?
14 years ago
all
i have an assignment that requires the user to enter a JTextField integer value.
that value is then used to draw an equal # of ovals.
after the ovals are drawn user selects a color button (red/blue) to fill the ovals already drawn based on the button color.
i have everything coded and working except the coloring.
i need help because i can't seem to figure out where or how to fill the ovals with the colors of the button pushed.
OvalDriver7b invokes OvalFrame7B invokes OvalPanel7B.
thanx
75gator



[ April 27, 2004: Message edited by: Douglas Braxton ]
[ April 27, 2004: Message edited by: Douglas Braxton ]
[ April 27, 2004: Message edited by: Douglas Braxton ]
[ April 27, 2004: Message edited by: Douglas Braxton ]
[ April 28, 2004: Message edited by: Douglas Braxton ]
14 years ago
all
i am attempting to draw a polygon (in this case a pentagon) and have succeeded in getting it drawn and displayed on JPanel.
trouble starts when i try to texture it so that the pentagon stands out from the rectangle it is painted on.
please help. SEE "// TROUBLE STARTS HERE" comment
compiler errors so far are
MyPoly7A.java [47:1] cannot resolve symbol
symbol : constructor BufferedImage (int[],int[],int,int)
location: class java.awt.image.BufferedImage
BufferedImage buffImage = new BufferedImage ( xy [ 0 ], xy [ 1 ], 5, BufferedImage.TYPE_INT_RGB );
^
MyPoly7A.java [49:1] cannot resolve symbol
symbol : constructor TexturePaint (java.awt.image.BufferedImage,java.awt.Polygon)
location: class java.awt.TexturePaint
TexturePaint tp = new TexturePaint ( buffImage, new Polygon( xy [ 0 ], xy [ 1 ], 5 ) );
^
MyPoly7A.java [51:1] cannot resolve symbol
symbol : method fillPoly (int,int,int,int)
location: class java.awt.Graphics2D
gg.fillPoly(10,10,200,300);
^
3 errors
Errors compiling MyPoly7A.


[ April 22, 2004: Message edited by: Douglas Braxton ]
14 years ago
all
i am attempting to draw a polygon (in this case a pentagon) and have succeeded in getting it drawn and displayed on JPanel.
trouble starts when i try to texture it so that the pentagon stands out from the rectangle it is painted on.
please help. SEE "// TROUBLE STARTS HERE" comment
compiler errors so far are
MyPoly7A.java [47:1] cannot resolve symbol
symbol : constructor BufferedImage (int[],int[],int,int)
location: class java.awt.image.BufferedImage
BufferedImage buffImage = new BufferedImage ( xy [ 0 ], xy [ 1 ], 5, BufferedImage.TYPE_INT_RGB );
^
MyPoly7A.java [49:1] cannot resolve symbol
symbol : constructor TexturePaint (java.awt.image.BufferedImage,java.awt.Polygon)
location: class java.awt.TexturePaint
TexturePaint tp = new TexturePaint ( buffImage, new Polygon( xy [ 0 ], xy [ 1 ], 5 ) );
^
MyPoly7A.java [51:1] cannot resolve symbol
symbol : method fillPoly (int,int,int,int)
location: class java.awt.Graphics2D
gg.fillPoly(10,10,200,300);
^
3 errors
Errors compiling MyPoly7A.



[ April 22, 2004: Message edited by: Douglas Braxton ]
[ April 22, 2004: Message edited by: Douglas Braxton ]
[ April 22, 2004: Message edited by: Douglas Braxton ]
[ April 22, 2004: Message edited by: Douglas Braxton ]
[ May 05, 2004: Message edited by: Douglas Braxton ]
14 years ago
maggie
this was something my instructor put on the board and did not explain very well.
are you saying i need a new class file called MyDrawPanel.
i thought it was a methiod?
doug
14 years ago
please see comment below // FOLLOWING LINE GEN's COMPILE ERROR
error is
TwoButtons.java [38:1] cannot resolve symbol
symbol : class MyDrawPanel
location: class TwoButtons
MyDrawPanel drawPanel = new MyDrawPanel();


[ April 20, 2004: Message edited by: Douglas Braxton ]
14 years ago
Thanks for the help. Problem solved!
14 years ago
Ranch Hands:

There is a lot of code here. Do not let it throw you. Most of it is here to avoid having to repost it if someone has a question
The problem lies within the statement followed by this comment (I think)
// # # # PROBLEM # # # in class MYFrame.
All code compiles clean.
OBJECT: Illustrate inheritance exercise which will have 15 random shapes drawn on a JFrame.
PROBLEM: When I execute the Driver the JFrame is BLANK. If you drag the frame the program executes as expected but it produces the following list of runtime errors:
java.lang.NullPointerException
at MyFrame.paint(MyFrame.java:55)
at sun.awt.RepaintArea.paint(RepaintArea.java:177)
at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:260)
at java.awt.Component.dispatchEventImpl(Component.java:3699)
at java.awt.Container.dispatchEventImpl(Container.java:1623)
at java.awt.Window.dispatchEventImpl(Window.java:1590)
at java.awt.Component.dispatchEvent(Component.java:3480)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
Thanks for your expert help.
75gator


[ April 13, 2004: Message edited by: Douglas Braxton ]
14 years ago

Originally posted by Douglas Braxton:


fred
sorry about being so dense. i just do not see how to accomplish getting the array of myLine objects 1- defined, 2- populated and 3- reference usable?
???
thanx
doug


fred
thanks
i found what i needed.
db
Used a search to find my answer in beginners forum
post # 000264
poste: June 8 2000
search arg: object arrays
14 years ago