Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

HTML

Name: Japplet 2006-12-04 20:17

I haven't been programming very long...
I have done some Java code in the past, though i admit it wasn't very elaborate or anything... and today i kinda did some HTML things with it... nothing too special but i kinda liked it and i want to learn more...
All i did was make some graphic objects using simple code like drawOval and stuff...

import javax.swing.*;
import java.awt.*;

public class Draw extends JApplet
{
    public void init()
    {
        getContentPane().setBackground(Color.white);
       
    }
   
    public void paint(Graphics g)
    {
        super.paint(g);
        int x;
        g.setColor(Color.green);
        g.drawLine(0,0,299,299);
        g.drawLine(0,299,299,0);
        g.setColor(Color.blue);
        g.drawOval(0,0,100,50);
        for(x=0; x<300;x+=10)
        {
            g.drawLine(x,0,299,x);
            g.drawLine(x,0,0,299-x);
        }
       
        
    }
}

so far thats all I got, the book my cousin let me borrow doesn't elaborate too much on HTML and only gives me a few more methods i can make with it and i wanted to know if anyone here knew of any good ones i could use and get practice with.

The few other ones i have used are things like void fillArc and things like that but again its not anything too special.
does anyone here have any suggestions on what else might be useful to make something more interesting?

Name: Aurath 2006-12-04 22:25

err, Color.white should read Color.WHITE
constants are always in all capitals.

As to your question. Google for java tutorials. I would recommend file input and output. Make a program that loads a file that looks like this

[cat]
var="5"
var2="test"

[cat2]
var="6"

and make it use functions like
find(category, var)
which would return "5" seeing that category "cat" field "var" is equal to five. Then query the user with a console on what to search for and report back with the results. This is an excellent excersize because it requires you to learn both file handling and text parsing.

Name: Anonymous 2006-12-05 7:08

>>1

How about a program that draws a swarm of dots on the screen that move like flies, following your mouse pointer? That would still be visually interesting, but also help you come to grips more with programming 2d geometry.

Name: Anonymous 2009-01-14 13:31

WHBTC

Name: Anonymous 2010-11-27 12:03

Name: Anonymous 2010-12-17 1:40

FOLLOW THE NEW GNAA TWITTER AT http://twitter.com/Gary_Niger

Name: Anonymous 2011-01-31 19:49

<-- check em dubz

Name: Sgt.Kabu콤躶kimanꅽ� 2012-05-28 21:05

Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy

Name: Anonymous 2013-08-31 23:16



    ,.‐‐、       ,.-‐-、
   く__,.ヘヽ.    / ,ー、 〉
     \ ', !-─‐-i / /´
      /`ー'    L//`ヽ、
     /  /,  /|  ,  ,    ',
   イ  / /-‐/ i L_ ハ ヽ!  i
    レ ヘ 7イ`ト  レ'ァ-ト、!ハ|  |
     !,/7 'ゞ'   ´i__rハiソ|   | 
     |.从"  _   ,,,, / |./   |
     レ'| i>.、,,__ _,.イ /  .i  |
      レ'| | / k_7_/レ'ヽ, ハ. |
       | |/i 〈|/  i ,.ヘ | i |
      .|/ / i:   ヘ!  \ |
        kヽ>、ハ   _,.ヘ、   /、!
       !'〈//`T´', \ `'7'ーr'
       レ'ヽL__|___i,___,ンレ|ノ
         ト-,/ |___./
         'ー'  !_,./

Name: Anonymous 2013-08-31 23:17

>>13
stop bumping these old threads please, I'm trying to browse /prog/

Name: Anonymous 2013-09-01 0:48



            ,. '" ̄ '' 、ー--‐ 、.,_                ,.:'"ヽ.
         ,.:'´        `ヽ  `ヽァ`、            ,:'::::::::;:'
      ,'⌒」      ルイ      ァ'":.:.:.`ヽ.         /::::::::::/
     ,.'" ̄`ァ'、.,_____ ージ   __ノ ,i:.:.:.:.:.:.:.:.:.:.':,       ,'::::::::::;'
    !,アヽ、.,____  ____`>ー-‐‐ァ'o、!y'":.ヽ:.:.:.:.:',        !:::::::::;'
   //:.:./:.:./:.:.i ̄:.:.:.:!:.:.:.:.:';.:.:.:.:.:.:.:.:';i:.:.:.ノ:.:. ';:.:.:i        ':,_;ノ
  /:.:.:!:.:.:;':.:.:;':.:.:.:iー-.:.:,ハ:.:.:.:.:.ト、:.」ニ_ハ:.:.:.:.:.:.:. i:./        ,:'
  `ヽ:L__!:.:.:.i:.:.:.:,ゝ;=‐'、ヽ-‐' ァ'i´ '`ハY、:.:.:.:.:.:i:〈       ,:'
    ノ└ァ'カッ7 i  ハ      '、___ンノ!:.:ゝ、:.:.ト、ヽ、.,_,ノ   /
    (;.;.;ノ /パ ゝ- '       ⊂⊃:.:.:i:./:.:.:':,:.',ヽ.  /
   、__ソ' 〈:.:.:.⊂⊃   `_______    ,r'ノ:.:.:ハ`:、:.:.:.:!ノ /
      __ノ_ノ:.:.:':.、    ヽ!  `ソ ∠;_:.:.:/_;ン´__,.ァ7'´ ̄`ヽ
      `ソ:.:.:.:.:ノ`':ァ .、.,__  ,. イへ-'‐ァ'´ 7 / / ソ' ̄ ̄ヽi
       ^つ'´ ( ̄_,.r-イ   /´ /レ7! / ! !__,!ー---、 !
          ,.く/i__,/∞く   /]  /!,'  ', ',ソ、________ソ
         /  7 ',   /ヽ-'┘  レ、!ゝ、 ヽ、_______ノ/
        /   /  `♀'        ',`'ー>.,,_/___,,.ン'
      /  、i   /Fヽ、.,       i`i:::::::::::/:::::|
 _,.r‐ァ''"     ,!/   i   `''ー---─ i::r---/┐::::!
'´ / /      /    ハ         i:[二7二!::::::|
とi i       く    / !      、   〉:::::::::::::::::::::!

Name: Anonymous 2013-09-01 2:19



           ,ヘヽ.
           ヽヽ \                __________
          i"´ ̄`"'-、,ヽ.            /
          ヽ二ニ_- 、., `ヽ、____        /
              ,>.、\ .i  ``'ヽ.,      | 良 地 み
            /   `ヽ-'     `ヽ.  | い 球 ん
           / /  i 、  ヽ.      ',  .| と .は な
           | i | ,'!_ ',   ', ',     i. | こ  と  :
           レヽヘ!/、」_`ハ   i  i     | .| ろ  て. :
            _ン  'ト i`i !  ,ハ. |   i   | | だ  も
             .l    └' ' レ' | iヽ!  |  | ヽ、
             `ー.、   "  /| /    |  |    ̄ノノ ̄
::               r'     ,イ /|.     |  ', ....:::::´:::::::::::::::
::::               ,.>-r<,/ |. ',    |   !`ヽ、:::::::::::::::::::
::::::::          /´ヽ::::!へ/ ,ハヽ.   |   ノ::::/::`ヽ:::::::::::::
::::::::::::::        ,.イ:::::::::ヽ:::|-|/、 /i i  ./ /::::/::::::::::::`ヽ:;::::
::::::::::::::::::::: _,,.. -''"::::';::::::::::::ヽ!‐-、,./:::レ'ヽ ./'"::::::::_!;;:::-‐'''"::::::::::
:::::::::::::::;:'">'"\´7  ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄r‐-‐''" ̄`ヽ!ヽ.:::::::::::::::
:::::::::::::!/    i   [ZAYAKU]     `ー-ァ    ヽ,!:::::::::::;:イ

Don't change these.
Name: Email:
Entire Thread Thread List