Server Class
Server
’s constructor (Fig. 28.3, lines 30–55) creates the server’s GUI, which contains a JTextField
and a JTextArea
. Server
displays its output in the JTextArea
. When the main
method (lines 6–11 of Fig. 28.4) executes, it creates a Server
object, specifies the window’s default close operation and calls method runServer
(Fig. 28.3, lines 57–86).
Get Java™ How To Program (Early Objects), Tenth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.