Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 677 results for
oval
- Page 1
Oval shape does not display
Programming
Software Development
13 Years Ago
by skiabox
…*/ public class
Oval
extends javax.swing.JFrame { /** * Creates new form
Oval
*/ public
Oval
() { initComponents();… { public void run() { new
Oval
().setVisible(true); } }); } // …
Re: drawing oval in a jpanel
Programming
Software Development
16 Years Ago
by VernonDozier
…reworked my code. it works mostly except for putting an
oval
at launch by default, which im not sure cant be… extends JPanel? [QUOTE=Lensva;846928] also all but the last
oval
disapear on resize. is there any way around that without… (g); [/code] the same behavior should occur (only the last
oval
is visible). I think that is the root cause of…
creating shape like circle or oval(i wanted to design my own circle shape)
Programming
Software Development
16 Years Ago
by karhong
Hi, I'm trying to draw circle and
oval
by myself without using ".addEllipse" Can I draw it by pointer? which mean i point 4 point and then make it to become the shape of circle and
oval
. I tried to find solution in the net, but i dont seems to get any solution. Any Idea?
creating a moving Oval
Programming
Software Development
16 Years Ago
by Luckymeera
hi everyone i would be thankful if anyone could post a simple example where you continuously create a new
oval
after a random period of time( e.g A new moving
oval
is created after every 10 -15 seconds), and is destroyed when it reaches a particular X or Y coordinate. Looking forward for a reply..
Re: drawing oval in a jpanel
Programming
Software Development
16 Years Ago
by Lensva
…my code. it works mostly except for putting an
oval
at launch by default, which im not sure …achieve the same functionality? also all but the last
oval
disapear on resize. is there any way around … void paintComponent(Graphics g) { if(mouseEvent!=null) //draws an
oval
at launch without this g.fillOval(mouseX, mouseY, 10, 10…
creating an oval when clicking on a canvas by means of a mouse
Programming
Software Development
17 Years Ago
by nish88
Hi!! Actually,i am doing a simulation and i want a dot (small
oval
) to pop up when i click(by mouse) on the canvas. can anyone please help me or if possible give me the piece of codes to perform this. thanks in advance...
drawing oval in a jpanel
Programming
Software Development
16 Years Ago
by Lensva
its supposed to draw an
oval
on MouseClicked: [code="java"] import java.awt.event.*; …
Pictuerbox as oval
Programming
Software Development
15 Years Ago
by tqmd1
Dear Experts How to display picturebox as
oval
shape. Please help
Re: Oval shape does not display
Programming
Software Development
13 Years Ago
by NormR1
Is the JPanel added after the GUI is made visible? Try calling setVisible after adding the JPanel.
Re: Oval shape does not display
Programming
Software Development
13 Years Ago
by NormR1
There could be a conflict between the layout managers you are using. Try getting rid f the one used by the IDE and creating the layout yourself. I can not test the code bBecause the code uses packages not in the Java SE
Re: Oval shape does not display
Programming
Software Development
13 Years Ago
by skiabox
I add the JPanel in the constructor (it is the second line).
Re: Oval shape does not display
Programming
Software Development
13 Years Ago
by NormR1
What layout manager is being used? Does it accept a call to add() without any constraints/parameters? For example: add(component, BorderLayout,CENTER);
Oval drawn is jagged instead of smooth
Programming
Software Development
16 Years Ago
by VernonDozier
OK, this is a follow-up to this thread, which I have marked solved. [url]http://www.daniweb.com/forums/thread152797.html[/url] I changed things from GIF to PNG and that seems to solve the saving issue, but there is a new issue. I'm trying to create a semi-transparent circle as an image, which can be saved. The saving and retrieving seems to…
Re: Oval drawn is jagged instead of smooth
Programming
Software Development
16 Years Ago
by Ezzaral
I would just guess it stems from the fact you created a fixed size buffer image and rendered the red circle on it without anti-aliasing. You then draw that image in paintComponent. The image itself will be unchanged and I don't think turning on anti-aliasing in paintComponent will affect that image.
Re: Oval drawn is jagged instead of smooth
Programming
Software Development
16 Years Ago
by VernonDozier
[QUOTE=Ezzaral;719098]I would just guess it stems from the fact you created a fixed size buffer image and rendered the red circle on it without anti-aliasing. You then draw that image in paintComponent. The image itself will be unchanged and I don't think turning on anti-aliasing in paintComponent will affect that image.[/QUOTE] Yes, I think …
Re: creating shape like circle or oval(i wanted to design my own circle shape)
Programming
Software Development
16 Years Ago
by selvaganapathy
Do you want to implement the Circle, or Line Drawing Algorithm instead of using Graphics.DrawLine(), DrawEllipse () Method? Or You want to make application like paint ? rubberband elastic Drawing?
Re: creating shape like circle or oval(i wanted to design my own circle shape)
Programming
Software Development
16 Years Ago
by karhong
Actually, I created other shape such as trapezium, parallelogram, by using the addlines. I created them by having a middle point of the shape start from (x,y) - (100,100) but when i straight use the build in function to draw ellipse, i can't find any ways to set the mid point of the ellipse start from (100,100) I do that is because when …
Re: creating shape like circle or oval(i wanted to design my own circle shape)
Programming
Software Development
16 Years Ago
by selvaganapathy
Hi, You can perform the Transformation on your Points(By just adding or subtracting (100, 100) to each points). GDI+ uses (0,0) is the Mid point. But it provides Matrix class to Transform the Coordinate System. Example to Transform the Coordinate System [CODE=CSharp] private void Form1_Paint(object sender, PaintEventArgs e) { Graphics g …
Re: creating shape like circle or oval(i wanted to design my own circle shape)
Programming
Software Development
16 Years Ago
by karhong
Thanks alot !! it works out fine !! Appreciate it !!
Re: creating a moving Oval
Programming
Software Development
16 Years Ago
by Stefano Mtangoo
check [url]www.vpython.org[/url] and check pythons time module after reading, you come up with your code and we help you improve it Happy coding!
Re: creating an oval when clicking on a canvas by means of a mouse
Programming
Software Development
17 Years Ago
by katharnakh
The following code is incomplete, because it wont accomplish what you have asked for. But, thanks to Jrcagle, the code borrows some idea from his last post. Also some one in this forum have mentioned about getting (x, y) coordinates of where you click. I was just trying something with those ideas, and could do only this much. May be some one here …
Re: drawing oval in a jpanel
Programming
Software Development
16 Years Ago
by VernonDozier
You don't need [ICODE]drawP[/ICODE]. Add [ICODE]this[/ICODE] to the frame, not [ICODE]drawP[/ICODE]. Ditto with the MouseListener. Add the Listener to [ICODE]this[/ICODE].
Re: drawing oval in a jpanel
Programming
Software Development
16 Years Ago
by Ezzaral
Just a couple of minor but important changes in your setGui() method[code] public void setGui() { JFrame frame = new JFrame(); // remove this, you want to use your current class instance here // JPanel drawP = new JPanel(); // again, current instance addMouseListener(this); // same here frame.…
Re: drawing oval in a jpanel
Programming
Software Development
16 Years Ago
by Lensva
[QUOTE=VernonDozier;846959] Not sure what you are asking here. You are saying that you no longer want to have a class that extends JPanel? [/QUOTE] what i meant was is it posible to have [code="java"] public void setGui() { JFrame frame = new JFrame(); JPanel drawP = new JPanel(); drawP.addMouseListener(this); frame.…
Re: Pictuerbox as oval
Programming
Software Development
15 Years Ago
by 9952616873
[B][B][COLOR="Red"]HAI[/COLOR][/B][/B]
Re: Pictuerbox as oval
Programming
Software Development
15 Years Ago
by tqmd1
Hello Dear HAI what is this type of above answer?
Re: Pictuerbox as oval
Programming
Software Development
15 Years Ago
by selvaganapathy
Hi Try this [CODE=VB.NET] Imports System.Drawing.Drawing2D Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim gPath As GraphicsPath Dim rgn As Region PictureBox1.BackColor = Color.Blue 'Create a graphics path gPath = New GraphicsPath()…
Java help
Programming
Software Development
16 Years Ago
by Fiery Demon
…Location ovalOffset; private Location pictureLocation; private Color color; private
Oval
oval
; private Size size; private Location ovalOffset2; private Color color2…0, 0, 0); size = new Size(100, 200);
oval
= new
Oval
(pictureLocation, ovalOffset, size, color); ovalOffset2 = new Location(10…
Re: Java help
Programming
Software Development
16 Years Ago
by Alex Edwards
…{ private Location ovalOffset; private Location pictureLocation; private Color color; private
Oval
oval
; private Size size; private Location ovalOffset2; private Color color2; private… Color(0, 0, 0); size = new Size(100, 200);
oval
= new
Oval
(pictureLocation, ovalOffset, size, color); ovalOffset2 = new Location(10,10); color2…
build but not run... need a second set of eyes
Programming
Software Development
17 Years Ago
by Ortal
…) { switch (drawType) { case 0: //
Oval
MyShape
oval
= new MyShape();
oval
.x = Math.min(x, arg0.getX());
oval
.y = Math.min(y, arg0.getY…x - arg0.getX());
oval
.h = Math.abs(y - arg0.getY());
oval
.color = color;
oval
.fill = fill;
oval
.type = drawType; shapes.add(
oval
); break; case 1…
1
2
3
12
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
Backlink Auditor
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC