Re: Word Association Game Community Center Geeks' Lounge by JJ___ shapes--->square Shapes Programming Software Development by maverick420 …(int i = 0; i < shapes.length; i++) { if (shapes [i] == null) { shapes [i] = new Rectangle(width, height); …case 3: { for (int i = 0; i < shapes.length; i++) { shapes [i] = null; } } break; case 4: { for… Re: Shapes Programming Software Development by maverick420 …rectangle Enter 3 to delete all shapes Enter 4 to display all perimeters of all shapes Enter 5 to display all …Width User input 3 Delete all shapes User input 4 Display all perimeters of all shapes User input 5 Display all areas… of all shapes User input 6 Confirm user exit… Re: Shapes Programming Software Development by maverick420 … rectangle Enter 3 to delete all shapes Enter 4 to display all perimeters of all shapes Enter 5 to display all areas… Re: shapes in console app (win32) Programming Software Development by goyofoyo …circles, rectangles, and other graphic shapes. Does your teacher expect graphic shapes or text shapes ? Are you in a first…then I suspect your teacher only expects text shapes because graphic shapes are more advanced topic.[/QUOTE] yes this …just a way to chose shapes and display them. and by text shapes you mean shapes created by ***** or by… Re: shapes in console app (win32) Programming Software Development by Ancient Dragon That compiler can build GUI programs in which you can draw circles, rectangles, and other graphic shapes. Does your teacher expect graphic shapes or text shapes ? Are you in a first year programming class ? If yes, then I suspect your teacher only expects text shapes because graphic shapes are more advanced topic. shapes and colors program Programming Software Development by rena0514 …String[] args) { JFrame frame= new JFrame("Shapes and Colors"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.…listener); square.addActionListener (listener); label = new JLabel ("Shapes&Colors"); buttonPanel = new JPanel(); buttonPanel.setPreferredSize (new… Re: shapes and colors program Programming Software Development by rena0514 …main(String[] args) { JFrame frame= new JFrame("Shapes and Colors"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane().… (this); square.addActionListener (this); label = new JLabel ("Shapes&Colors"); buttonPanel = new JPanel(); buttonPanel.setPreferredSize (new … Re: shapes and colors program Programming Software Development by rena0514 …(String[] args) { JFrame frame= new JFrame("Shapes and Colors"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane…(this); square.addActionListener (this); label = new JLabel ("Shapes&Colors"); buttonPanel = new JPanel(); buttonPanel.setPreferredSize (new… shapes in console app (win32) Programming Software Development by goyofoyo hey I have been looking up shapes in c++ but everyone talks about needing certain compilers and #… and my teacher has just asked us to create different shapes. should i just use characters? and if i should are… Re: Shapes function Programming Software Development by Adak To show shapes and ALWAYS to post code << Use [Code] tags &… Using .h (C HEADER FILE) in Shapes.cpp Programming Software Development by Smoking Bros … Please take a look at my Shapes.h file: [CODE] class Shapes { public: Shapes(char shape, int x, int …include <iostream> #include "Shapes.h" using namespace std; Shapes::Shapes(char shape, int x, int y, … 5 C:\Documents and Settings\Benjamin Dahse\Shapes.cpp declaration of `Shapes::Shapes(char, int, int, int, int)'… draw shapes using mouse drag Programming Software Development by hany-h ….println("currentShapedrag="+currentShape); //shapes[shapeType].draw(g); repaint(); } …("shapeCountPaint="+shapeCount); //shapeCount--; shapes[shapeCount-1].draw(g); shapeCount--; }… Re: draw shapes using mouse drag Programming Software Development by JamesCherrill … 0, so you add the shape at index 0, ie shapes[shapeCount] = (the new shape). After that you immediately add…When the second shape is created it goes into shapes[shapeCount] - which is shapes[1], then shapeCount gets incremented to 2. In…all you have to do is loop thru all the shapes between shapes[0] and shapes[shapeCount-1] and draw them all. Application not drawing shapes Programming Software Development by idlackage … { numOfShapes = 0; repaint(); } // Draws the shapes in the shapeObjects array. // Uses instance variable numOfShapes to…== null ) { return; } else { // Otherwise, draw the shapes currentShapeObject.draw( g ); } } private class MouseHandler extends MouseAdapter implements … Re: Using .h (C HEADER FILE) in Shapes.cpp Programming Software Development by mrnutty Your porblem was : [code] Shapes::Shapes(char shape, int x, int y, int width, int height); <--THIS SEMICOLON { cout << "You created a: " << shape " shape. At X: " << x " At Y: " << y " Width: " << width " Height: " << height << endl; } [/code] Re: Application not drawing shapes Programming Software Development by idlackage … void clearDrawing() { numOfShapes = 0; repaint(); } // Draws the shapes in the shapeObjects array. // Uses instance variable numOfShapes to determine…if ( currentShapeObject == null ) { return; } else { // Otherwise, draw the shapes for (int i = 0; i < numOfShapes; i++) { shapeObjects[i… Re: Using .h (C HEADER FILE) in Shapes.cpp Programming Software Development by NathanOliver … shape object but not a pointer the just use[icode] Shapes square("square", 0, 0, 10, 10); [/icode… Re: Using .h (C HEADER FILE) in Shapes.cpp Programming Software Development by Smoking Bros … shape object but not a pointer the just use[icode] Shapes square("square", 0, 0, 10, 10); [/icode][/QUOTE… Testing if a point exists in different shapes Programming Software Development by Hypnos_16 … point. The program should print out the list of shapes, and a true/false value that indicates if the …point is contained in the shape. The shapes file contains one shape per line. An example of …Shape s; while ( (s=sf.nextShape()) != null ) { } } }[/CODE] Here's shapes.data that is also required [CODE]rect 10 20 30… drawing random shapes on the screen Programming Software Development by Violet_82 …{ public static void main( String[] args){ Shapes panel = new Shapes(); JFrame application = new JFrame(); application.setDefaultCloseOperation(… 10; i++ ){ //determine the coordinates and size of shapes to draw shape = decideShape(); colour = decideColour(); x = … Re: Testing if a point exists in different shapes Programming Software Development by Hypnos_16 … drawn. So when type into the command line java Containment shapes.data x y (x and y will be actual integers… example here) it should take the information from shapes.data, draw the shapes then take the x and y values and use… happens. I can only run it with java Containment < shapes.data and i think because i can only run it… Re: drawing random shapes on the screen Programming Software Development by Violet_82 … javax.swing.JPanel; import java.util.Random; public class Shapes extends JPanel{ private static final Random randomShape = new Random…i < 10; i++ ){ //determine the coordinates and size of shapes to draw shape = decideShape(); colour = decideColour(); x = decideCoordinates( width … Re: drawing random shapes on the screen Programming Software Development by Violet_82 …import javax.swing.JPanel; import java.util.Random; public class Shapes extends JPanel{ private static final Random randomShape = new Random();… i < 10; i++ ){ //determine the coordinates and size of shapes to draw shape = decideShape(); colour = decideColour(); x = decideCoordinates( width … Re: Application not drawing shapes Programming Software Development by Ezzaral The painting issue is because you're only painting your shapes in the array when [iCODE]currentShapeObject[/iCODE] is not null - … painting code to this the problem resolves[code] // draw the shapes for (int i = 0; i < numOfShapes; i++) { shapeObjects[i… Re: Application not drawing shapes Programming Software Development by Ezzaral … do with painting. Third, if you want to paint multiple shapes, you have to loop the [ICODE]shapeObjects[/ICODE] array and… Re: Application not drawing shapes Programming Software Development by Ezzaral …( g ); }[/CODE] Is that right?[/QUOTE]Mostly. Make sure your shapes aren't null before you try to draw them from… method to change shapes not working Programming Software Development by Mi_99 … is my move method to make my shapes move, rebound, and move horizontally and vertically…{ moveY = moveY * -1; } // Wide shapes move up and down, narrow shapes move sideways if (width > 15) { y … This is my shape class that all shapes extend: [CODE] package shapes; import java.awt.*; import java.util… Re: drawing random shapes on the screen Programming Software Development by mvmalderen …run the program everytime I resize the java windows the shapes get drawn again, whereas I'd like them to …;thanks...wouldn't have a clue how to save the shapes sorry : -) Not required by the exercise, however, you can …store your shapes in an ArrayList and in your paintComponent draw every shape… Android Native - Draw Basic Shapes On Canvas Programming Mobile Development by dimitrilc …you would have learned: 1. How to draw basic shapes using custom Drawable. ## Tools Required ## 1. Android…com/attachments/4/be826d3c70242c05de9b4b66033cbfff.png) ## Draw More Basic Shapes ## Once you have figured out the coordinate system…Summary ## We have learned how to draw basic shapes in this tutorial. The full project code can …