本文整理汇总了Python中javax.swing.JTable类的典型用法代码示例。如果您正苦于以下问题:Python JTable类的具体用法?Python JTable怎么用?Python JTable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了JTable类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: changeSelection
def changeSelection(self, row, col, toggle, extend):
# show the message entry for the selected row
selectedMessage = self.getModel()._db.getMessageByRow(row)
self._extender._tabs.removeAll()
# NOTE: testing if .locked is ok here since its a manual operation
if self.getModel()._db.lock.locked():
# Provide some feedback on a click
self.redrawTable()
return
# Create original Request tab and set default tab to Request
# Then Create test tabs and set the default tab to Response for easy analysis
originalTab = self.createRequestTabs(selectedMessage._requestResponse)
originalTab.setSelectedIndex(0)
self._extender._tabs.addTab("Original",originalTab)
for userIndex in selectedMessage._userRuns.keys():
if not self.getModel()._db.arrayOfUsers[userIndex].isDeleted():
tabname = str(self.getModel()._db.arrayOfUsers[userIndex]._name)
self._extender._tabs.addTab(tabname,self.createRequestTabs(selectedMessage._userRuns[userIndex]))
# TODO: do this on a tab change on extender._tabs: I think its needed for sending to repeater and comparer
# WEIRD: I think this should make it so that only the original can be sent to places
# However, it looks like it is working as expected... ???
self._extender._currentlyDisplayedItem = selectedMessage._requestResponse
JTable.changeSelection(self, row, col, toggle, extend)
return
示例2: changeSelection
def changeSelection(self, row, col, toggle, extend):
'''
Displays the selected item in the content pane
'''
JTable.changeSelection(self, row, col, toggle, extend)
self.bottom_pane.show_log_entry(self.gui_log.get(row))
示例3: gui
def gui(self):
xnode = self.xdoc.getDocumentElement()
tnode = self.createTree(xnode)
# create tree and display
jt = JTree(tnode)
jsp = JScrollPane(jt)
tree_box = Box(BoxLayout.Y_AXIS)
tree_box.add(jsp)
tree_box.add(Box.createHorizontalStrut(10))
headerSorter = TableSorter(DefaultTableModel())
jtb = JTable(headerSorter)
headerSorter.addMouseListenerToHeaderInTable(jtb)
jtb.setAutoResizeMode(JTable.AUTO_RESIZE_OFF)
jsp2 = JScrollPane(jtb)
table_box = Box(BoxLayout.Y_AXIS)
table_box.add(jsp2)
table_box.add(Box.createHorizontalStrut(500))
mp = JPanel()
mp.setLayout(BoxLayout(mp,BoxLayout.X_AXIS))
mp.add(tree_box)
mp.add(table_box)
# add listeners
nsl = NodeSelectionListener(jtb,xnode)
jt.addTreeSelectionListener(nsl)
#
return mp
示例4: __initTable
def __initTable(self):
table = JTable(HitListModel())
scrollpane = JScrollPane(table)
table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF)
table.addMouseListener(HitListMouseListener())
self.add(scrollpane, self.__createTableConstraints())
scrollpane.addComponentListener(PanelSizeChangeListener(table))
return table
示例5: changeSelection
def changeSelection(self, row, col, toggle, extend):
logEntry = self._extender._log.get(row)
self._extender._requestViewer.setMessage(logEntry._requestResponse.getRequest(), True)
self._extender._responseViewer.setMessage(logEntry._requestResponse.getResponse(), False)
self._extender._currentlyDisplayedItem = logEntry._requestResponse
JTable.changeSelection(self, row, col, toggle, extend)
return
示例6: __init__
def __init__(self,linac_wizard_document):
#--- linac_wizard_document the parent document for all controllers
self.linac_wizard_document = linac_wizard_document
self.main_panel = JPanel(BorderLayout())
#----etched border
etched_border = BorderFactory.createEtchedBorder()
#------tables with Seq. names and button
tables_panel = JPanel(BorderLayout())
tables_panel.setBorder(etched_border)
self.first_table = JTable(WS_Records_Table_Model("First "))
self.last_table = JTable(WS_Records_Table_Model("Last "))
self.first_table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION)
self.last_table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION)
self.first_table.setFillsViewportHeight(true)
self.last_table.setFillsViewportHeight(true)
tables01_panel = JPanel(BorderLayout())
scrl_panel0 = JScrollPane(self.first_table)
scrl_panel1 = JScrollPane(self.last_table)
#tables01_panel.add(JScrollPane(self.first_table),BorderLayout.WEST)
#tables01_panel.add(JScrollPane(self.last_table),BorderLayout.EAST)
self.first_table.getCellRenderer(0,0).setHorizontalAlignment(JLabel.CENTER)
self.last_table.getCellRenderer(0,0).setHorizontalAlignment(JLabel.CENTER)
self.first_table.setPreferredScrollableViewportSize(Dimension(120,300))
self.last_table.setPreferredScrollableViewportSize(Dimension(120,300))
tables01_panel.add(scrl_panel0,BorderLayout.WEST)
tables01_panel.add(scrl_panel1,BorderLayout.EAST)
tables_button_panel = JPanel(BorderLayout())
tables_button_panel.add(tables01_panel,BorderLayout.WEST)
seq_button_panel = JPanel(FlowLayout(FlowLayout.CENTER,5,5))
seq_set_button = JButton(" Set ComboSequence ")
seq_button_panel.add(seq_set_button)
tables_button_panel.add(seq_button_panel,BorderLayout.SOUTH)
tables_panel.add(tables_button_panel,BorderLayout.NORTH)
self.main_panel.add(tables_panel,BorderLayout.WEST)
#--------central panel-------
cav_amp_phase_button = JButton(" Read Cavities Amp.&Phases from Ext. File ")
cav_info_from_scl_tuneup_button = JButton("Get SCL Cav. Amp.&Phases from SCL Long. TuneUp")
new_accelerator_button = JButton(" Setup a New Accelerator File ")
center_buttons_panel0 = JPanel(FlowLayout(FlowLayout.CENTER,5,5))
center_buttons_panel0.add(cav_amp_phase_button)
center_buttons_panel1 = JPanel(FlowLayout(FlowLayout.CENTER,5,5))
center_buttons_panel1.add(cav_info_from_scl_tuneup_button)
center_buttons_panel2 = JPanel(FlowLayout(FlowLayout.CENTER,5,5))
center_buttons_panel2.add(new_accelerator_button)
center_buttons_panel = JPanel(GridLayout(3,1))
center_buttons_panel.add(center_buttons_panel0)
center_buttons_panel.add(center_buttons_panel1)
center_buttons_panel.add(center_buttons_panel2)
center_panel = JPanel(BorderLayout())
center_panel.add(center_buttons_panel,BorderLayout.NORTH)
self.main_panel.add(center_panel,BorderLayout.CENTER)
#---------add actions listeners
seq_set_button.addActionListener(Make_Sequence_Listener(self))
cav_amp_phase_button.addActionListener(Read_Cav_Amp_Phase_Dict_Listener(self))
cav_info_from_scl_tuneup_button.addActionListener(Get_SCL_Cav_Amp_Phase_Listener(self))
new_accelerator_button.addActionListener(SetUp_New_Accelerator_Listener(self))
示例7: __init__
def __init__(self,scl_long_tuneup_controller):
#--- scl_long_tuneup_controller the parent document for all SCL tune up controllers
self.scl_long_tuneup_controller = scl_long_tuneup_controller
self.main_panel = JPanel(BorderLayout())
#----etched border
etched_border = BorderFactory.createEtchedBorder()
#------top params panel-----------------------
top_params_panel = JPanel(BorderLayout())
self.set_phase_shift_panel = SetPhaseShiftAndTimeStep_Panel(self.scl_long_tuneup_controller)
self.start_stop_scan_panel = StartStopPhaseScan_Panel(self.scl_long_tuneup_controller)
top_params_panel.add(self.set_phase_shift_panel,BorderLayout.NORTH)
top_params_panel.add(self.start_stop_scan_panel,BorderLayout.SOUTH)
#------cavities scan table panel --------
cavs_scan_panel = JPanel(BorderLayout())
self.cavs_table = JTable(Cavs_PhaseScan_Table_Model(self.scl_long_tuneup_controller))
self.cavs_table.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION)
self.cavs_table.setFillsViewportHeight(true)
self.cavs_table.getSelectionModel().addListSelectionListener(Cavs_Table_Selection_Listener(self.scl_long_tuneup_controller))
self.bpms_table_model = PhaseScan_BPMs_Table_Model(self.scl_long_tuneup_controller)
self.bpms_table = JTable(self.bpms_table_model)
self.bpms_table.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION)
self.bpms_table.setFillsViewportHeight(true)
self.bpms_table.getSelectionModel().addListSelectionListener(BPMs_Table_Selection_Listener(self.scl_long_tuneup_controller))
self.bpms_table.setPreferredScrollableViewportSize(Dimension(200,300))
scrl_panel0 = JScrollPane(self.cavs_table)
scrl_panel0.setBorder(etched_border)
scrl_panel1 = JScrollPane(self.bpms_table)
self.bpm_table_border = BorderFactory.createTitledBorder(etched_border,"Cavity")
scrl_panel1.setBorder(self.bpm_table_border)
cavs_scan_panel.add(scrl_panel0,BorderLayout.CENTER)
cavs_scan_panel.add(scrl_panel1,BorderLayout.EAST)
self.bpm_table_panel = scrl_panel1
#---------- graph panels --------------------------
self.bpm_phaseDiff_graph_panel = BPM_PhaseDiff_Graph_Panel(self.scl_long_tuneup_controller)
self.bpm_phase_and_amp_graph_panel = BPMs_Amp_Phase_Graphs_Panel(self.scl_long_tuneup_controller)
grap_panel = JPanel(GridLayout(1,2))
grap_panel.add(self.bpm_phaseDiff_graph_panel)
grap_panel.add(self.bpm_phase_and_amp_graph_panel)
#--------center panel = graphs + tables-------------
center_panel = JPanel(GridLayout(2,1))
center_panel.add(cavs_scan_panel)
center_panel.add(grap_panel)
#-------- post-scan filtering panel
bottom_panel = JPanel(BorderLayout())
self.post_scan_panel = PostPhaseScanActions_Panel(self.scl_long_tuneup_controller)
bottom_panel.add(self.post_scan_panel,BorderLayout.WEST)
#--------------------------------------------------
self.main_panel.add(top_params_panel,BorderLayout.NORTH)
self.main_panel.add(bottom_panel,BorderLayout.SOUTH)
self.main_panel.add(center_panel,BorderLayout.CENTER)
#------scan state
self.scan_state_controller = ScanStateController()
示例8: __init__
class QuadCavDictSelection_Panel (JPanel):
def __init__(self,transverse_twiss_analysis_Controller):
self.transverse_twiss_analysis_Controller = transverse_twiss_analysis_Controller
self.setLayout(BorderLayout())
#-----------dict table panel
etched_border = BorderFactory.createEtchedBorder()
border = BorderFactory.createTitledBorder(etched_border,"Quad and Cavities Amp.&Phases Sets")
self.setBorder(border)
self.quad_cav_dict_table_model = QuadCavDict_Table_Model(self.transverse_twiss_analysis_Controller.accStatesKeeper)
self.dict_table = JTable(self.quad_cav_dict_table_model)
self.dict_table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION)
self.dict_table.setFillsViewportHeight(true)
self.dict_table.setPreferredScrollableViewportSize(Dimension(120,100))
self.dict_table.getSelectionModel().addListSelectionListener(QuadCavDict_Table_Selection_Listener(self.transverse_twiss_analysis_Controller))
#--------buttons panel
button_panel = JPanel(BorderLayout())
self.gaussButton = JRadioButton("Use Ext. Gauss Fit")
self.custom_gaussButton = JRadioButton("Use Gauss Fit")
self.custom_rmsButton = JRadioButton("Use RMS")
button_group = ButtonGroup()
button_group.add(self.gaussButton)
button_group.add(self.custom_gaussButton)
button_group.add(self.custom_rmsButton)
button_group.clearSelection()
self.gaussButton.setSelected(true)
button_panel0 = JPanel(FlowLayout(FlowLayout.LEFT,2,2))
button_panel0.add(self.gaussButton)
button_panel1 = JPanel(FlowLayout(FlowLayout.LEFT,2,2))
button_panel1.add(self.custom_gaussButton)
button_panel2 = JPanel(FlowLayout(FlowLayout.LEFT,2,2))
button_panel2.add(self.custom_rmsButton)
button_panel012 = JPanel(GridLayout(3,1))
button_panel012.add(button_panel0)
button_panel012.add(button_panel1)
button_panel012.add(button_panel2)
#-------new buttons-----
button_bottom_panel = JPanel(FlowLayout(FlowLayout.LEFT,2,2))
button_bottom_panel0 = JPanel(GridLayout(3,1,2,2))
dump_quad_fields_button = JButton("Dump Quad Fields to ASCII")
dump_quad_fields_button.addActionListener(Dump_Quad_Fields_Button_Listener(self.transverse_twiss_analysis_Controller))
button_bottom_panel0.add(dump_quad_fields_button)
dump_cav_amps_phases_button = JButton("Dump. Cav Amps. Phases to ASCII")
dump_cav_amps_phases_button.addActionListener(Dump_Cav_Amps_Phases_Button_Listener(self.transverse_twiss_analysis_Controller))
button_bottom_panel0.add(dump_cav_amps_phases_button)
read_cav_amps_phases_button = JButton("Read Cav Amps. Phases from ASCII")
read_cav_amps_phases_button.addActionListener(Read_Cav_Amps_Phases_Button_Listener(self.transverse_twiss_analysis_Controller))
button_bottom_panel0.add(read_cav_amps_phases_button)
button_bottom_panel.add(button_bottom_panel0)
#----- final knobs panel
button_panel.add(button_panel012,BorderLayout.NORTH)
button_panel.add(button_bottom_panel,BorderLayout.SOUTH)
self.gaussButton.addActionListener(FitParam_Buttons_Listener(self.transverse_twiss_analysis_Controller,0))
self.custom_gaussButton.addActionListener(FitParam_Buttons_Listener(self.transverse_twiss_analysis_Controller,1))
self.custom_rmsButton.addActionListener(FitParam_Buttons_Listener(self.transverse_twiss_analysis_Controller,2))
#----------------------------------------------------------
self.add(JScrollPane(self.dict_table), BorderLayout.WEST)
self.add(button_panel, BorderLayout.CENTER)
def getMainPanel(self):
return self
示例9: changeSelection
def changeSelection(self, row, col, toggle, extend):
# show the log entry for the selected row
logEntry = self._extender._log.get(row)
self._extender._origRequestViewer.setMessage(logEntry._origRequestResponse.getRequest(), True)
self._extender._origResponseViewer.setMessage(logEntry._origRequestResponse.getResponse(), False)
if not logEntry._modRequestResponse is None:
self._extender._modRequestViewer.setMessage(logEntry._modRequestResponse.getRequest(), True)
self._extender._modResponseViewer.setMessage(logEntry._modRequestResponse.getResponse(), False)
else:
self._extender._modRequestViewer.setMessage(toBytes(""), True)
self._extender._modResponseViewer.setMessage(toBytes(""), False)
self._extender._currentlyDisplayedItem = logEntry._origRequestResponse
JTable.changeSelection(self, row, col, toggle, extend)
return
示例10: registerExtenderCallbacks
def registerExtenderCallbacks(self,callbacks):
self.callbacks = callbacks
self.helpers = callbacks.getHelpers()
self.callbacks.setExtensionName("KkMultiProxy")
self.PROXY_LIST = []
self.jPanel = JPanel()
boxVertical = Box.createVerticalBox()
boxHorizontal = Box.createHorizontalBox()
boxHorizontal.add(JButton("File",actionPerformed=self.getFile))
self.FileText = JTextField("")
boxHorizontal.add(self.FileText)
boxVertical.add(boxHorizontal)
TableHeader = ('IP','PORT')
TableModel = DefaultTableModel(self.PROXY_LIST,TableHeader)
self.Table = JTable(TableModel)
boxVertical.add(self.Table)
boxHorizontal = Box.createHorizontalBox()
boxHorizontal.add(JButton("Add",actionPerformed=self.addIP))
boxHorizontal.add(JButton("Delete",actionPerformed=self.deleteIP))
boxHorizontal.add(JButton("Save",actionPerformed=self.saveIP))
boxVertical.add(boxHorizontal)
self.jPanel.add(boxVertical)
self.callbacks.addSuiteTab(self)
self.callbacks.registerHttpListener(self)
return
示例11: __init__
def __init__(self,top_document,main_loop_controller):
#--- top_document is a parent document for all controllers
self.top_document = top_document
self.main_loop_controller = main_loop_controller
self.main_panel = JPanel(BorderLayout())
#----etched border
etched_border = BorderFactory.createEtchedBorder()
#----------------------------------------------
left_panel = JPanel(BorderLayout())
self.rf_power_table = JTable(RF_Power_Table_Model(self))
self.rf_power_table.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION)
self.rf_power_table.setFillsViewportHeight(true)
self.rf_power_table.setPreferredScrollableViewportSize(Dimension(800,240))
scrl_rf_power_panel = JScrollPane(self.rf_power_table)
scrl_rf_power_panel.setBorder(BorderFactory.createTitledBorder(etched_border,"RF Net Power"))
self.init_buttons_panel = Init_RF_Power_Controller_Panel(self)
self.start_stop_panel = Start_Stop_Panel(self)
tmp0_panel = JPanel(BorderLayout())
tmp0_panel.add(self.init_buttons_panel,BorderLayout.NORTH)
tmp0_panel.add(scrl_rf_power_panel,BorderLayout.CENTER)
tmp0_panel.add(self.start_stop_panel,BorderLayout.SOUTH)
tmp1_panel = JPanel(BorderLayout())
tmp1_panel.add(tmp0_panel,BorderLayout.NORTH)
left_panel.add(tmp1_panel,BorderLayout.WEST)
#--------------------------------------------------------
self.main_panel.add(left_panel,BorderLayout.WEST)
#---- non GUI controllers
self.loop_run_state = Loop_Run_State()
示例12: __init__
def __init__(self,linac_wizard_document):
#--- linac_wizard_document the parent document for all controllers
self.linac_wizard_document = linac_wizard_document
#--------------------------------------------------------------
self.main_panel = JPanel(BorderLayout())
#-------------------------------------------------------------
#----etched border
etched_border = BorderFactory.createEtchedBorder()
#-------------------------------------------------------------
self.initial_twiss_params_holder = Twiss_Params_Holder()
self.initTwiss_table = JTable(Init_Twiss_Table_Model(self.initial_twiss_params_holder))
self.initTwiss_table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION)
self.initTwiss_table.setFillsViewportHeight(true)
self.initTwiss_table.setPreferredScrollableViewportSize(Dimension(240,160))
initTwiss_panel = JPanel(BorderLayout())
initTwiss_panel.add(JScrollPane(self.initTwiss_table), BorderLayout.CENTER)
initTwiss_knobs_panel = JPanel(FlowLayout(FlowLayout.CENTER,5,5))
initTwiss_button = JButton("Init Twiss from Design")
initTwiss_button.addActionListener(Init_Twiss_Button_Listener(self))
initTwiss_knobs_panel.add(initTwiss_button)
initTwiss_panel.add(initTwiss_knobs_panel, BorderLayout.SOUTH)
border = BorderFactory.createTitledBorder(etched_border,"Initial Twiss Parameters")
initTwiss_panel.setBorder(border)
#--------Init_and_Fit_Params_Controller panel ----------
self.init_and_fit_params_controller = Init_and_Fit_Params_Controller(self.linac_wizard_document,self)
#Twiss fitter is defined in the transverse_twiss_fitter_lib.py
self.twiss_fitter = null
#----add panels to the main
tmp_panel = JPanel(BorderLayout())
tmp_panel.add(initTwiss_panel, BorderLayout.WEST)
tmp_panel.add(self.init_and_fit_params_controller.getMainPanel(),BorderLayout.EAST)
self.main_panel.add(tmp_panel, BorderLayout.WEST)
示例13: initTable
def initTable(self, lociNames, pv, ci, locusFst):
colNames = Vector()
colNames.add('Locus')
colNames.add('Het')
colNames.add('Fst')
colNames.add('P(simulated Fst < sample Fst)')
colNames.add('FDR')
data = Vector()
self.data = data
falses = self.calcFalsePositives(pv, ci, self.fdr)
currentPos = 0
for i in range(len(lociNames)):
line = Vector()
locus = lociNames[i]
line.add(locus)
if not locusFst[i]:
line.add("NA")
line.add("NA")
line.add("NA")
line.add("NA")
else:
line.add(str(pv[currentPos][0]))
line.add(str(pv[currentPos][1]))
line.add(str(self.getP(pv[currentPos])))
line.add(str(falses[currentPos]))
currentPos += 1
data.add(line)
self.table = JTable(data, colNames)
self.table.setDefaultRenderer(Class.forName("java.lang.Object"),
ColorRenderer(data, ci, self.chart.neuColor,
self.chart.balColor, self.chart.posColor))
示例14: __init__
def __init__(self,scl_long_tuneup_controller):
#--- scl_long_tuneup_controller the parent document for all SCL tune up controllers
self.scl_long_tuneup_controller = scl_long_tuneup_controller
self.main_panel = JPanel(BorderLayout())
#----etched border
etched_border = BorderFactory.createEtchedBorder()
#------top panels = offsets analysis ----------------------------
top_panel = JPanel(BorderLayout())
self.bpms_offsets_from_ccl4_panel = BPMs_Offsets_from_CCL4_Panel(self.scl_long_tuneup_controller)
self.bpms_offsets_from_hebt1_panel = BPMs_Offsets_from_HEBT1_Panel(self.scl_long_tuneup_controller)
self.bpms_offsets_from_ext_file_panel = BPMs_Offsets_from_ExtFile_Panel(self.scl_long_tuneup_controller)
top_panel0 = JPanel(BorderLayout())
top_panel0.add(self.bpms_offsets_from_ccl4_panel,BorderLayout.NORTH)
top_panel0.add(self.bpms_offsets_from_hebt1_panel,BorderLayout.SOUTH)
top_panel1 = JPanel(BorderLayout())
top_panel1.add(top_panel0,BorderLayout.NORTH)
top_panel1.add(self.bpms_offsets_from_ext_file_panel,BorderLayout.SOUTH)
top_panel.add(top_panel1,BorderLayout.NORTH)
#--------center panel = table------------
center_panel = JPanel(BorderLayout())
self.bpm_offsets_table_model = PhaseOffsets_BPMs_Table_Model(self.scl_long_tuneup_controller)
self.bpm_offsets_table = JTable(self.bpm_offsets_table_model)
self.bpm_offsets_table.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION)
self.bpm_offsets_table.setFillsViewportHeight(true)
scrl_panel = JScrollPane(self.bpm_offsets_table)
scrl_panel.setBorder(etched_border)
center_panel.add(scrl_panel,BorderLayout.CENTER)
#-------- bottom panel = post analysis ---------------
bottom_panel = JPanel(BorderLayout())
self.set_bpms_as_bad_panel = Set_BPMs_as_Bad_Panel(self.scl_long_tuneup_controller)
bottom_panel.add(self.set_bpms_as_bad_panel,BorderLayout.SOUTH)
#--------------------------------------------------
self.main_panel.add(top_panel,BorderLayout.NORTH)
self.main_panel.add(center_panel,BorderLayout.CENTER)
self.main_panel.add(bottom_panel,BorderLayout.SOUTH)
示例15: __init__
def __init__(self, parent, title, modal, app):
border = BorderFactory.createEmptyBorder(5, 7, 5, 7)
self.getContentPane().setBorder(border)
self.setLayout(BoxLayout(self.getContentPane(), BoxLayout.Y_AXIS))
#Intro
falsePositivePng = File.separator.join([app.SCRIPTDIR,
"images",
"icons",
"not_error36.png"])
introLbl = JMultilineLabel(app.strings.getString("manual_false_positives_info"))
introLbl.setMaxWidth(600)
#Table
table = JTable()
columns = [app.strings.getString("Tool"),
app.strings.getString("Check"),
app.strings.getString("Error_id"),
app.strings.getString("OSM_id")]
self.tableModel = MyTableModel([], columns)
table.setModel(self.tableModel)
scrollPane = JScrollPane(table)
scrollPane.setAlignmentX(0.0)
#OK button
btnPanel = JPanel(FlowLayout(FlowLayout.CENTER))
okBtn = JButton("OK",
ImageProvider.get("ok"),
actionPerformed=self.on_okBtn_clicked)
btnPanel.add(okBtn)
btnPanel.setAlignmentX(0.0)
#Layout
headerPnl = JPanel()
headerPnl.setLayout(BoxLayout(headerPnl, BoxLayout.X_AXIS))
headerPnl.add(JLabel(ImageIcon(falsePositivePng)))
headerPnl.add(Box.createRigidArea(Dimension(10, 0)))
headerPnl.add(introLbl)
headerPnl.setAlignmentX(0.0)
self.add(headerPnl)
self.add(Box.createRigidArea(Dimension(0, 10)))
self.add(scrollPane)
self.add(Box.createRigidArea(Dimension(0, 10)))
self.add(btnPanel)
self.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE)
self.pack()