logo

Issues with JTable and Java.security in Advanced Software Engineering Coursework1

Exercises based on refactoring and design patterns in Advanced Software Engineering course.

5 Pages614 Words367 Views
   

Added on  2023-06-03

About This Document

This coursework discusses the issues with JTable and Java.security in Advanced Software Engineering. It also suggests refactoring methods to improve the class. The JTable class has issues with default sorting, viewing of data, editing, updating UI, and printing table. The best refactoring method is to pull up methods to the superclass. The Java.security package provides classes and interfaces for security, public and private keys, message digest algorithm, and object protection. InvalidKeyException and DigestException generate exceptions.

Issues with JTable and Java.security in Advanced Software Engineering Coursework1

Exercises based on refactoring and design patterns in Advanced Software Engineering course.

   Added on 2023-06-03

ShareRelated Documents
Advanced Software Engineering
Coursework1
Student Name
email
Course
Date
Issues with JTable and Java.security in Advanced Software Engineering Coursework1_1
1. a)
The main problem is with the default sorting. If the model structure of JTable is changed ,
RowFilter is not applied correctly, for example, if Row 0 is filtered out the sorting result
will be empty as in [1].
b)
Viewing of data
JTable does not store data but is used to display data from another source which could be a
database. The methods used for this responsibility include:
getTableHeader() to display table header.
addRowSelectionInterval() add rows to the table.
Editing
Several methods are used in perform this responsibility.
getEditingColumn() that returns the column that is currently being edited.
getEditingRow() returns the row containing the cell to be edited.
getEditorComponent() returning the component in the editing session.
editCellAt() edits cells at particular row and column.
Updating UI
The class also updates the user interfaces of the table as shown by the below methods.
updateUI() that returns a notification from manager that the L&F has changed
Printing Table
The class has a responsibility of printing table as shown in the methods below:
Print() to display printing method to print the table.
Print(JTable.PrintMode p) prints the table in a given printing mode.
Issues with JTable and Java.security in Advanced Software Engineering Coursework1_2

End of preview

Want to access all the pages? Upload your documents or become a member.