|
-
data streaming & bit shift operations
My assignment is to create an application that will allow a user to type in
two numbers assumed to be of type byte. The user will then press on one
of the six buttons (labeled &, ^, |, ~, >>, <<) and the result will appear
in the text area on the lower right part of the application. The result
will also be written out to a file named "Nitebyte". I'm using a frame with
a (2x2)grid layout. In the first gridcell (top left) is a text field (declared
as t1) labeled "original byte". The second gridcell (top right) is a text
field (declared as t2) labeled "factored byte". The third gridcell (bottom
left) is a (2x3) grid with the six buttons. The fourth gridcell has the
text area (declared as tA). I'm stuck on the functionality that has to happen
in actionPerformed. My code looks like the following:
public void actionPerformed (ActionEvent e)
{
if (e.getSource() == b1)//b1 - b6 declared as a Buttons
{
}
else if (e.getSource() == b2)
{
}
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks