jar file is a ziped file of all classes, compiled, the whole code. if you douple click you see what’s inside

in manifesto:

MIDlet-Jar-URL: htto://www.where.com/path/to/MPGUIExample.jar

give link to the jad and give path to jar

can be downloaded from sms or website
objects
slows application down
if we do string blabla
and don’t declare new object but do “blas” equals string it would work faster

other difficulties:
sketch has to have the same name like class

if copy pasting code: go into textwrangler: show invisibles, you have to delete some blank spaces

EXAMPLE:
starting screen
screen with RSS sources
buttons for reading
another page has name of source and articles
articles

Pcontainer for each screen:

  • elements on screen are in each Pcontainer
    PimageLabel
    Plabels don’t need a font
    Plist (inside PLabel, pbutton)
    Textfield
  • button to go back to last or first screen

    make mapping on paper for each GUI application you do first
    ONE more Pcontainer (e.g. current screen) this one is different:

    current screen equals SPLASH SCREEN /equals what ever screen I want to display
    it draws current screen, so you don’t have to do anything in draw, current screen keeps track of where we are in the application

    method: calculate bounds (total dimensions of screen) know how big it has to be to be readable.
    setBounds(sets relative heights,, widths, etc..)

    add components to the appropriate screen (right button to right container)

    make a link on button:

    2 methods keyPressed and key Released
    current container does that
    hand it the keyPressed and key Released events
    generates a library event when buttom press is detected

    current container = e.g. screen one

    look through the source


    AUDIO encoding

    default sample rate is 8000 per sec
    each sample 8 bits
    pcm: gives raw data, without compression, header, you can analyze, change and influence data
    dag digital converter reading from the microphone

    1) create class for each object
    2) softkey method for softkey (takes a string “capture”)
    3) initialize “vidcap” (you could also use one that only captures audio, not video) show camera
    4) drawing will slow down so “Loop”
    5) if library.getClass() . isInstance (vidcap) && event ==…. ………….so you know the class is done capturing video
    6) redraw