Awt

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Awt as PDF for free.

More details

  • Words: 473
  • Pages: 5
fontmetrics fontmetrics getfontmetrics() graphics fontmetrics getfontmetrics(font obj) applet int getascent() int getdescent() int getleading() int getheight() int charwidth(char ch) int charwidth(int val) int stringwidth(string str) int getmaxadvance() font getfont() component label - passive button checkbox choice list scrollbar textcomponent ---- textfield

textarea

component add(component obj) void remove(component obj) void removeall() label label() label(string str) label(string str,int alignment) left

right

center

void settext(string str) string gettext() void setalignment(int value) int getalignment() button

(actionlistener) button() button(string label) void setlabel(string str) string getlabel() checkbox checkbox() checkbox(string str) checkbox(string str,boolean value) checkbox(string str,boolean value,checkboxgroup obj) checkbox(string str,checkboxgroup obj,boolean value) boolean getstate() void setstate(boolean value) string getlabel() void setlabel(string str)

checkboxgroup checkboxgroup() checkbox getselectedcheckbox() void setselectedcheckbox(checkbox obj) choice - itemlistener choice() void add(string name) string getselecteditem() int getselectedindex() int getitemcount() void remove (int index) void remove (string str) void select(int indexno) void select(string name) string getitem(int indexno) list list() list(int size) list(int size,boolean value)

-multi selection

void add(string name) string getselecteditem() int getselectedindex() void select(int indexno) void select(string name) int getitemcount() string[] getselecteditems() int[] getselectedindexes() scrollbar scrollbar() scrollbar(int style) vertical,horizontal scrollbar(int style,int initialvalue,int thumbsize,int min,int max) int getvalue() void setvalue(int newvalue) void setunitincrement(int newincr) 1 void setblockincrement(int newincr) 10 void setvalues(int initialvalue,int thumbsize,int min,int max) textfield textfield() textfield(int size) textfield(string str) textfield(string str,int size) string gettext() void settext(string str) string getselectedtext() void select(int startindex,int endindex) void seteditable(boolean value)

void setechochar(char ch) char getechochar() void selectall() textarea textarea() textarea(string str) textarea(int row,int col) textarea(string str,int row,int col) textarea(string str,int row,int col,int scrolls) 0-both

1-vertical

2-horizontal

3-none

string gettext() void settext(string str) string getselectedtext() void select(int startindex,int endindex) void seteditable(boolean value) void selectall() void append(string str) void insert(string str,int index) void replacerange(string str,int startindex,int endindex) int getselectionstart() int getselectionend() flowlayout flowlayout() flowlayout(int howtoalign) flowlayout(int howtoalign,int horz,int vert) left right center -default borderlayout borderlayout() borderlayout(int horz,int vert) void add(component compobj,object region) center north south east west gridlayout gridlayout() gridlayout(int row,int col) gridlayout(int row,int col,int horz,int vert) cardlayout cardlayout() cardlayout(int horz,int vert) void void void void

first(panel obj) last(panel obj) previous(panel obj) next(panel obj)

void show(panel obj,string cardname) panel void add(panel obj,string cardname) gridbaglayout gridbaglayout() setconstraints(component obj,gridbagconstraints obj) gridbagconstraints frame frame() frame(string title) void settitle(string str) string gettitle() void setsize(int width,int height) void setsize(dimension obj) void setbounds(int x,int y,int width,int height) dimension getsize() void setvisible(boolean value) void show() void hide() void setresizable(boolean value) ----> setmenubar(menubar obj) menubar menubar() menu add(menu obj) menu menu() menu(string caption) menuitem add(menuitem obj) void setlabel(string caption) string getlabel() menu add(menu obj) menuitem menuitem() menuitem(string caption) void setlabel(string caption) string getlabel() void setenabled(boolean value) boolean isenabled() checkboxmenuitem checkboxmenuitem() checkboxmenuitem(string caption) checkboxmenuitem(string caption,boolean on) boolean getstate() void setstate(boolean on)

filedialog filedialog(frame obj) filedialog(frame obj,string caption) filedialog(frame obj,string caption,int how) filedialog.load -default filedialog.save void setdirectory(string str) string getdirectory() string getfile() void setfile(string filename) void setmode(int how) int getmode() void setfilenamefilter(filenamefilter obj) dialog(frame parent,boolean mode) dialog(frame parent,string title,boolean mode) void dispose()

Related Documents

Awt
November 2019 14
Awt Programs
October 2019 21
Modulo05 Awt Swing
June 2020 6
10 Awt Components
November 2019 15
Awt Components 1
November 2019 15
Awt Components-2
November 2019 16