Applets are small Java components that can be included in HTML pages, while Swing is a framework for developing graphical user interfaces (GUIs) for both applets and standalone Java applications. Servlets are server-side components that run on a web server and extend the server's capabilities, while JSPs (JavaServer Pages) are web pages that use scripting to generate dynamic content and can be compiled into servlets. JavaScript is a client-side scripting language that runs in web browsers to provide dynamic interactivity on websites, whereas servlets and JSPs are server-side technologies.
Applets are small Java components that can be included in HTML pages, while Swing is a framework for developing graphical user interfaces (GUIs) for both applets and standalone Java applications. Servlets are server-side components that run on a web server and extend the server's capabilities, while JSPs (JavaServer Pages) are web pages that use scripting to generate dynamic content and can be compiled into servlets. JavaScript is a client-side scripting language that runs in web browsers to provide dynamic interactivity on websites, whereas servlets and JSPs are server-side technologies.
Applets are small Java components that can be included in HTML pages, while Swing is a framework for developing graphical user interfaces (GUIs) for both applets and standalone Java applications. Servlets are server-side components that run on a web server and extend the server's capabilities, while JSPs (JavaServer Pages) are web pages that use scripting to generate dynamic content and can be compiled into servlets. JavaScript is a client-side scripting language that runs in web browsers to provide dynamic interactivity on websites, whereas servlets and JSPs are server-side technologies.
applet:-small component written in java dt can be included/plugged in html pageo
r other markup lang page. swing:-its basically a framework for developing d GUI for java apps and applet. *************diff. b/w applet and servlets---- applet:-it works at client side bcoz its a small applicatn deliverd to user in f orm of bytecode, is a client side java prog. dt runs wdin a web browser on d client m/c. servlet:-its a server side component dt runs on d web page on server,used to ext end d capability of server.(lyk PHP or ASP.NET) *************diff. b/w servlet and javascript(jsp)---- JSP and SERVLETS both creates dynamic web content and r server-s ide java techniques (dey receives a request and generates a response based on it).-lyk PHP JSP(Java Server Pages):-its a webpage scripting lang. dt cn generate dynamic con tent,cn be compiled to servlets. -easier to code coz similar to HTML. -slow coz takes compilat tym to convert to java servlets. servlets:-bt dey r java progs. dt r already complied which also creates dynamic web content. *************dif. b/w javascript ,jsp and servlets---- javascript:-completely diff. dynamic programming lang from java,though its synta x nd some keywrds were lyk java's. -runs in client-side -it wn applied to an html document,cn provide dynamic interactivity on w ebsites. servlets & jsp:-server side.
API-applicatn progaramming interface--list of all classes(prewritten) dt r part
of JDK for building s/w apps. It specifies hw s/w components shud interact nd is used wn programming G UI components. JFC-Java Foundation Classes.D standard API for providing a GUI for a java prog. Dey r a set of GUI components which simplify d development of desktop/wi ndow-based apps. ******consist of AWT,SWING and JAVA 2D. AWT(awt API)-Abstract Window Toolkit.Java's original platform-dependent(i.e.comp onents r displayed acc. to d view of Operating System) GUI toolkit preceding swing wd less and heavyweight(i.e. its comp. uses d resources of d system)components. SWING(SWING API)-its built on top of AWT API.It provides platform independent nd light wt. components. -->we can write d code of swing inside main(),const, or ny other method. ====-----the methods of component class(of AWT i.e. java.awt.Component)r widely used in swing. 1. setVisible-sets d visibility of d component nd by default false. (COMPONENT-an obj having a graphical representation dt cn be displayed on s creen nd interact wd d user. eg-scrollpane,checkbox etc.) -> public void setVisible(boolean b) 2. add-add a component on another component. ->public void add(Component c) 3. setSize-set size of d component. ->public void setSize(int width,int height) 4.setLayout-set d layout manager 4 d component. ->public void setlayout(LayoutManager m) (JButton Class,JRadioButoon,JTextArea,JComboBox,JTable,JColorChooser,JPogressBar ,JSlider,Digital Watch,Graphics in swing,Displaying image, OpenDialog Box,Notepad,BorderLayout,GridLayout,FlowLayout,CardLayout) -------------------------------------------------------------------------------- ------------------------------------------------- 1.JButton-used to create button dt hv platform-independent implementatn 2.setDefaultCloseOperation()-used to specify one of several ops. for close butto n. dse const. cn be specified as choice:EXIT_ON_CLOSE-exit applicatn HIDE_ON_CLOSE-hide frame bt keep app runn ing DISPOSE_ON_CLOSE-dispose of frame obj bt keep app running DO_NOTHING_ON_CLOSE-ignore click 3.setResizable()-for ensuring dt a graphical interface looks d way u wnt. 4.