Hello,
here is simple Draw subroutine that do what you asked for, and can be used in any windows form app, it is necessary to have one Panel control on your form, and set background color of panel to White, and dock property to fill or dock to parent container.
If you analize code you shall learn some basics of drawing by using Graphics class.
Try reading MSDN about Graphics class to learn much more.
MSDN Graphics Class Link[
^]
All the best,
Perić Željko
void Draw()
{
Graphics table;
Pen pencil;
Brush brush;
Font font;
Color rubber;
PointF start_line;
PointF end_line;
int panel_height;
int panel_width;
table = panel1.CreateGraphics();
start_line = new PointF();
start_line.X = 0;
start_line.Y = 0;
end_line = new PointF();
end_line.X = 0;
end_line.Y = 0;
pencil = new Pen(Color.Red,2);
brush = new SolidBrush(Color.Black);
font = new Font("LucidaConsole",12,FontStyle.Bold);
rubber = new Color();
rubber = Color.White;
panel_height = panel1.Height;
panel_width = panel1.Width;
table.Clear(rubber);
start_line.X = 0;
start_line.Y = panel_height-20;
end_line.X = panel_width;
end_line.Y = start_line.Y;
table.DrawLine(pencil,start_line,end_line);
end_line.X-=20;
table.DrawString("x",font,brush,end_line);
start_line.X = 20;
start_line.Y = 0;
end_line.X = start_line.X;
end_line.Y = panel_width;
table.DrawLine(pencil,start_line,end_line);
table.DrawString("y",font,brush,start_line);
}