{"id":1535,"date":"2022-08-30T15:17:20","date_gmt":"2022-08-30T15:17:20","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/27\/java-repaint-is-undefined-in-class-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:17:20","modified_gmt":"2022-08-30T15:17:20","slug":"java-repaint-is-undefined-in-class-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/java-repaint-is-undefined-in-class-collection-of-common-programming-errors\/","title":{"rendered":"Java : repaint is undefined in class-Collection of common programming errors"},"content":{"rendered":"<p>I am new on java. I want to create an abstract factory in java. I have a class <code>point<\/code> and I want to extend other classes ( <code>circle, rectangle<\/code> ) from this.<\/p>\n<p>Here is my code. It says repaint is undefined..<\/p>\n<pre><code>import javax.swing.*;\nimport java.awt.*;\nimport java.awt.Component;\nimport javax.swing.*;\n\n\npublic class Circle extends Point {\n\npublic void Draw() {\n    repaint();\n}\n\npublic void paint(Graphics g) {       \n\n    g.drawOval(this.x, this.y, 10, 10);\n\n}...\n<\/code><\/pre>\n<p id=\"rop\"><small>Originally posted 2013-11-27 05:07:34. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I am new on java. I want to create an abstract factory in java. I have a class point and I want to extend other classes ( circle, rectangle ) from this. Here is my code. It says repaint is undefined.. import javax.swing.*; import java.awt.*; import java.awt.Component; import javax.swing.*; public class Circle extends Point { [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1535","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1535","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=1535"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1535\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1535"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1535"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1535"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}