import java.awt.*;
import javax.swing.*;
import java.awt.Color;
import java.util.Vector;
public class MySMTPReport {
public MySMTPReport(){
pingsucces=0;
pingfailed=0;
percent=0;
total=0;
columnNames = new Vector<String>();
columnNames.add("Date");
columnNames.add("Time");
columnNames.add("State");
columnNames.add("Replytime");
data = new Vector<Vector>();
southeast = new JPanel();
southeast.setPreferredSize(new Dimension(50,200));
}
public void analyzePing(String date, String time,boolean succes, String replytime){
Vector<Object> row = new Vector<Object>(3);
if(succes){
pingsucces++;
total++;
row.add(date);
row.add(time);
row.add("Succeded");
row.add(replytime);
}
else{
pingfailed++;
total++;
row.add(date);
row.add(time);
row.add("Failed");
row.add(replytime);
JLabel test = new JLabel("Warning");
southeast.add(test);
}
data.addElement( row );
}
public void generateSMTPChart(){
north = new JPanel();
north.setLayout(new BorderLayout());
north.setBorder(BorderFactory.createTitledBorder("Summary"));
northwest = new JPanel();
northwest.setLayout(new GridLayout(3,1,0,5));
JLabel totallabel = new JLabel("Total count of ping: "+total);
JLabel succeslabel = new JLabel("Succeded: "+pingsucces);
JLabel failedlabel = new JLabel("Failed: "+pingfailed);
northwest.add(totallabel);
northwest.add(succeslabel);
northwest.add(failedlabel);
percent=pingsucces*100/total;
north.add(northwest,BorderLayout.WEST);
south = new JPanel();
south.setLayout(new BorderLayout());
south.setPreferredSize(new Dimension(200,200));
reporttable=new JTable(data, columnNames);
scroll= new JScrollPane(reporttable);
scroll.setBackground(Color.GRAY);
south.add(scroll,BorderLayout.WEST);
south.add(southeast, BorderLayout.EAST);
smtppanel=new JPanel();
smtppanel.setLayout(new BorderLayout());
smtppanel.add(north,BorderLayout.NORTH);
smtppanel.add(south,BorderLayout.CENTER);
}
public JPanel getSMTP(){
return smtppanel;
}
private JPanel smtppanel;
private JPanel north;
private JPanel northwest;
private ChartPanel northeast;
private JPanel south;
private JScrollPane scroll;
private JTable reporttable;
private Vector<String> columnNames;
private Vector<Vector> data ;
private JPanel southeast;
private int pingsucces;
private int pingfailed;
private double percent;
private int total;
}
import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.*;
public class Driver extends JFrame{
public Driver(JPanel panel){
class CMyWindowListener extends WindowAdapter {
public void windowClosing(WindowEvent e){
System.exit(0);
}
}
setContentPane(panel);
setSize(625, 510);
show();
}
/**
* @param args
*/
public static void main(String[] args) {
MySMTPReport report = new MySMTPReport();
report.analyzePing("01-01-2006", "00:00", true, "0.12");
report.analyzePing("01-01-2006", "00:30", true, "0.86");
report.analyzePing("01-01-2006", "01:00", true, "0.712");
report.analyzePing("01-01-2006", "01:30", true, "0.486");
report.analyzePing("01-01-2006", "02:00", true, "0.35");
report.analyzePing("01-01-2006", "02:30", true, "0.12");
report.analyzePing("01-01-2006", "03:00", true, "0.95");
report.analyzePing("01-01-2006", "03:30", true, "0.36");
report.analyzePing("01-01-2006", "04:00", true, "0.812");
report.analyzePing("01-01-2006", "04:30", true, "0.286");
report.analyzePing("01-01-2006", "05:00", true, "0.12");
report.analyzePing("01-01-2006", "05:30", true, "0.86");
report.analyzePing("01-01-2006", "06:00", true, "0.412");
report.analyzePing("01-01-2006", "06:30", true, "0.786");
report.analyzePing("01-01-2006", "07:00", true, "0.12");
report.analyzePing("01-01-2006", "07:30", true, "0.86");
report.analyzePing("01-01-2006", "08:00", true, "0.712");
report.analyzePing("01-01-2006", "08:30", true, "0.865");
report.analyzePing("01-01-2006", "09:00", true, "0.12");
report.analyzePing("01-01-2006", "09:30", true, "0.16");
report.analyzePing("01-01-2006", "10:00", true, "0.22");
report.analyzePing("01-01-2006", "10:30", true, "0.12");
report.analyzePing("01-01-2006", "11:00", true, "0.32");
report.analyzePing("01-01-2006", "11:30", true, "0.586");
report.analyzePing("01-01-2006", "12:00", true, "0.13658");
report.analyzePing("01-01-2006", "12:30", true, "0.85");
report.analyzePing("01-01-2006", "13:00", true, "0.13");
report.analyzePing("01-01-2006", "13:30", true, "0.68");
report.analyzePing("01-01-2006", "14:00", true, "0.89");
report.analyzePing("01-01-2006", "14:30", true, "0.65");
report.analyzePing("01-01-2006", "15:00", true, "0.15");
report.analyzePing("01-01-2006", "15:30", true, "0.86");
report.analyzePing("01-01-2006", "16:00", true, "0.12");
report.analyzePing("01-01-2006", "16:30", true, "0.856");
report.analyzePing("01-01-2006", "17:00", true, "0.5");
report.analyzePing("01-01-2006", "17:30", true, "0.86");
report.analyzePing("01-01-2006", "18:00", true, "0.12");
report.analyzePing("01-01-2006", "18:30", true, "0.846");
report.analyzePing("01-01-2006", "19:00", true, "0.12");
report.analyzePing("01-01-2006", "19:30", true, "0.826");
report.analyzePing("01-01-2006", "20:00", true, "0.192");
report.analyzePing("01-01-2006", "20:30", true, "0.846");
report.analyzePing("01-01-2006", "21:00", false, "100");
report.analyzePing("01-01-2006", "21:30", true, "0.866");
report.analyzePing("01-01-2006", "22:00", true, "0.142");
report.analyzePing("01-01-2006", "22:30", true, "0.786");
report.analyzePing("01-01-2006", "23:00", true, "0.182");
report.analyzePing("01-01-2006", "23:30", true, "0.786");
report.analyzePing("02-01-2006", "00:00", true, "0.12");
report.analyzePing("02-01-2006", "00:30", true, "0.86");
report.analyzePing("02-01-2006", "01:00", true, "0.712");
report.analyzePing("02-01-2006", "01:30", true, "0.486");
report.analyzePing("02-01-2006", "02:00", false, "100");
report.analyzePing("02-01-2006", "02:30", false, "100");
report.analyzePing("02-01-2006", "03:00", false, "100");
report.analyzePing("02-01-2006", "03:30", false, "100");
report.analyzePing("02-01-2006", "04:00", false, "100");
report.analyzePing("02-01-2006", "04:30", false, "100");
report.analyzePing("02-01-2006", "05:00", true, "0.12");
report.analyzePing("02-01-2006", "05:30", true, "0.86");
report.analyzePing("02-01-2006", "06:00", true, "0.412");
report.analyzePing("02-01-2006", "06:30", true, "0.786");
report.analyzePing("02-01-2006", "07:00", true, "0.12");
report.analyzePing("02-01-2006", "07:30", true, "0.86");
report.analyzePing("02-01-2006", "08:00", true, "0.712");
report.analyzePing("02-01-2006", "08:30", true, "0.865");
report.analyzePing("02-01-2006", "09:00", true, "0.12");
report.analyzePing("02-01-2006", "09:30", true, "0.16");
report.analyzePing("02-01-2006", "10:00", true, "0.22");
report.analyzePing("02-01-2006", "10:30", true, "0.12");
report.analyzePing("02-01-2006", "11:00", true, "0.32");
report.analyzePing("02-01-2006", "11:30", true, "0.586");
report.analyzePing("02-01-2006", "12:00", true, "0.13658");
report.analyzePing("02-01-2006", "12:30", true, "0.85");
report.analyzePing("02-01-2006", "13:00", true, "0.13");
report.analyzePing("02-01-2006", "13:30", true, "0.68");
report.analyzePing("02-01-2006", "14:00", true, "0.89");
report.analyzePing("02-01-2006", "14:30", true, "0.65");
report.analyzePing("02-01-2006", "15:00", true, "0.15");
report.analyzePing("02-01-2006", "15:30", true, "0.86");
report.analyzePing("02-01-2006", "16:00", true, "0.12");
report.analyzePing("02-01-2006", "16:30", true, "0.856");
report.analyzePing("02-01-2006", "17:00", true, "0.5");
report.analyzePing("02-01-2006", "17:30", true, "0.86");
report.analyzePing("02-01-2006", "18:00", true, "0.12");
report.analyzePing("02-01-2006", "18:30", true, "0.846");
report.analyzePing("02-01-2006", "19:00", true, "0.12");
report.analyzePing("02-01-2006", "19:30", true, "0.826");
report.analyzePing("02-01-2006", "20:00", true, "0.192");
report.analyzePing("02-01-2006", "20:30", true, "0.846");
report.analyzePing("02-01-2006", "21:00", false, "100");
report.analyzePing("02-01-2006", "21:30", true, "0.866");
report.analyzePing("02-01-2006", "22:00", true, "0.142");
report.analyzePing("02-01-2006", "22:30", true, "0.786");
report.analyzePing("02-01-2006", "23:00", true, "0.182");
report.analyzePing("02-01-2006", "23:30", true, "0.786");
report.analyzePing("03-01-2006", "00:00", true, "0.12");
report.analyzePing("03-01-2006", "00:30", true, "0.86");
report.analyzePing("03-01-2006", "01:00", true, "0.712");
report.analyzePing("03-01-2006", "01:30", true, "0.486");
report.analyzePing("03-01-2006", "02:00", true, "0.35");
report.analyzePing("03-01-2006", "02:30", true, "0.12");
report.analyzePing("03-01-2006", "03:00", true, "0.95");
report.analyzePing("03-01-2006", "03:30", true, "0.36");
report.analyzePing("03-01-2006", "04:00", true, "0.812");
report.analyzePing("03-01-2006", "04:30", true, "0.286");
report.analyzePing("03-01-2006", "05:00", true, "0.12");
report.analyzePing("03-01-2006", "05:30", true, "0.86");
report.analyzePing("03-01-2006", "06:00", true, "0.412");
report.analyzePing("03-01-2006", "06:30", true, "0.786");
report.analyzePing("03-01-2006", "07:00", true, "0.12");
report.analyzePing("03-01-2006", "07:30", true, "0.86");
report.analyzePing("03-01-2006", "08:00", true, "0.712");
report.analyzePing("03-01-2006", "08:30", true, "0.865");
report.analyzePing("03-01-2006", "09:00", true, "0.12");
report.analyzePing("03-01-2006", "09:30", true, "0.16");
report.analyzePing("03-01-2006", "10:00", true, "0.22");
report.analyzePing("03-01-2006", "10:30", true, "0.12");
report.analyzePing("03-01-2006", "11:00", true, "0.32");
report.analyzePing("03-01-2006", "11:30", true, "0.586");
report.analyzePing("03-01-2006", "12:00", true, "0.13658");
report.analyzePing("03-01-2006", "12:30", true, "0.85");
report.analyzePing("03-01-2006", "13:00", true, "0.13");
report.analyzePing("03-01-2006", "13:30", true, "0.68");
report.analyzePing("03-01-2006", "14:00", true, "0.89");
report.analyzePing("03-01-2006", "14:30", true, "0.65");
report.analyzePing("03-01-2006", "15:00", true, "0.15");
report.analyzePing("03-01-2006", "15:30", true, "0.86");
report.analyzePing("03-01-2006", "16:00", true, "0.12");
report.analyzePing("03-01-2006", "16:30", true, "0.856");
report.analyzePing("03-01-2006", "17:00", true, "0.5");
report.analyzePing("03-01-2006", "17:30", true, "0.86");
report.analyzePing("03-01-2006", "18:00", true, "0.12");
report.analyzePing("03-01-2006", "18:30", true, "0.846");
report.analyzePing("03-01-2006", "19:00", true, "0.12");
report.analyzePing("03-01-2006", "19:30", true, "0.826");
report.analyzePing("03-01-2006", "20:00", true, "0.192");
report.analyzePing("03-01-2006", "20:30", true, "0.846");
report.analyzePing("03-01-2006", "21:00", false, "100");
report.analyzePing("03-01-2006", "21:30", true, "0.866");
report.analyzePing("03-01-2006", "22:00", true, "0.142");
report.analyzePing("03-01-2006", "22:30", true, "0.786");
report.analyzePing("03-01-2006", "23:00", true, "0.182");
report.analyzePing("03-01-2006", "23:30", true, "0.786");
report.generateSMTPChart();
Driver test= new Driver(report.getSMTP());
System.out.println("fertig");
}
}
JButton test = new JButton(String.valueOf(total));
test.addActionListener( new ActionListener(){
public void actionPerformed(ActionEvent arg0) {
reporttable.editCellAt(Integer.parseInt(arg0.getActionCommand()), 0);
scroll.revalidate();
}
});
southeast.add(test);
JViewport test = new JViewport();
test.setPreferredSize(new Dimension(200,200));
test.add(reporttable);
scroll.setBackground(Color.GRAY);
scroll.setRowHeader(test);
JButton jbutton = new JButton(String.valueOf(total-1));
jbutton.addActionListener( new ActionListener(){
public void actionPerformed(ActionEvent arg0) {
reporttable.editCellAt(Integer.parseInt(arg0.getActionCommand()), 0);
scroll.revalidate();
smtppanel.revalidate();
}
});
southeast.add(jbutton);
scroll.setRowHeaderView(jbutton);
JLabel wr= new JLabel("Warning");
scroll.setRowHeaderView(wr);
JViewport tablecontainer = new JViewport();
tablecontainer.add(reporttable);
scroll.setViewportView(tablecontainer);
/*
* ScrollJump.java
*/
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.table.*;
public class ScrollJump extends JFrame {
public ScrollJump() {
super("Scroll Jump");
setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
setSize(400,300);
setLocationRelativeTo(null);
initComponents();
tableModel = (DefaultTableModel)reporttable.getModel();
for(int i = 0; i<10000; i++){
String[] rowData = {"A_Test_"+i, "B_Test_"+i, "C_Test_"+i};
if(i==500 || i==5000){
rowData[2] = "Failed";
}
tableModel.addRow(rowData);
}
addComponentListener(new ComponentAdapter(){
public void componentResized(ComponentEvent e){
scanTable();
}
});
setVisible(true);
scanTable();
}
private void initComponents() {
reporttable = new JTable();
markierungsPanel = new JPanel();
reporttable.setModel(new DefaultTableModel(
new Object [][] {
},
new String [] {
"Title 1", "Title 2", "Title 3"
}
) {
Class[] types = new Class [] {
String.class, String.class, String.class
};
public Class getColumnClass(int columnIndex) {
return types [columnIndex];
}
});
getContentPane().add(new JScrollPane(reporttable), BorderLayout.CENTER);
markierungsPanel.setLayout(null);
markierungsPanel.setPreferredSize(new Dimension(15, 10));
getContentPane().add(markierungsPanel, BorderLayout.EAST);
}
private void scanTable(){
markierungsPanel.removeAll();
for(int row = 0; row<reporttable.getRowCount(); row++){
String value = reporttable.getValueAt(row,2).toString().trim();
if(value.equals("Failed")){
markierungsPanel.add(new Markierung(row));
}
}
markierungsPanel.revalidate();
markierungsPanel.repaint();
}
public static void main(String args[]){new ScrollJump();}
private DefaultTableModel tableModel;
private JPanel markierungsPanel;
private JTable reporttable;
class Markierung extends JLabel{
public Markierung(int row){
this.row = row;
setBackground(Color.orange);
setBorder(BorderFactory.createLineBorder(Color.lightGray));
setOpaque(true);
setSize(new Dimension(13,5));
double rowCount = reporttable.getRowCount(); //hier statt table => reporttable
double factor = row / rowCount;
double height = markierungsPanel.getSize().getHeight();
int position = (int)(height * factor);
Component comp = markierungsPanel.getComponentAt(0,position);
while(comp != null && comp instanceof Markierung){
position = position + 5;
comp = markierungsPanel.getComponentAt(0,position);
}
setLocation(0,position);
int max = (int)(height - 5);
String text = "Fehler: "+reporttable.getValueAt(row,0).toString();
setToolTipText(text);
if(position > max){
setLocation(0,max);
comp = markierungsPanel.getComponentAt(0,max);
if(comp != null && comp instanceof Markierung){
comp.setBackground(Color.red);
String text1 = ((Markierung)comp).getToolTipText();
if(!text1.startsWith("<html>")) text1 = "<html>" + text1 ;
((Markierung)comp).setToolTipText(text1+"
"+text);
}
}
setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
addMouseListener(new MouseAdapter(){
public void mouseClicked(MouseEvent e){
markierungMouseClicked(e);
}
});
}
private void markierungMouseClicked(MouseEvent e){
reporttable.scrollRectToVisible(reporttable.getCellRect(row, 0, false));
reporttable.changeSelection(row,0,false,false);
}
private int row;
}
}
south = new JPanel();
south.setLayout(new BorderLayout());
south.setPreferredSize(new Dimension(200,200));
reporttable=new JTable(data, columnNames);
scroll= new JScrollPane(reporttable);
south.add(scroll,BorderLayout.CENTER);
markierungsPanel.setLayout(null);
markierungsPanel.setPreferredSize(new Dimension(15, 10));
south.add(markierungsPanel, BorderLayout.EAST);
scanTable();
smtppanel.setLayout(new BorderLayout());
smtppanel.add(north,BorderLayout.NORTH);
smtppanel.add(south,BorderLayout.CENTER)
markierungsPanel.revalidate();
markierungsPanel.repaint();
private void scanTable(){
markierungsPanel.removeAll();
for(int row = 0; row<reporttable.getRowCount(); row++){
String value = reporttable.getValueAt(row,2).toString().trim();
if(value.equals("Failed")){
markierungsPanel.add(new Markierung(row));
}
}
markierungsPanel.revalidate();
markierungsPanel.repaint();
}
class Markierung extends JLabel{
public Markierung(int row){
this.row = row;
setBackground(Color.orange);
setBorder(BorderFactory.createLineBorder(Color.lightGray));
setOpaque(true);
setSize(new Dimension(13,5));
double rowCount = reporttable.getRowCount(); //hier statt table => reporttable
double factor = row / rowCount;
double height = markierungsPanel.getSize().getHeight();
int position = (int)(height * factor);
Component comp = markierungsPanel.getComponentAt(0,position);
while(comp != null && comp instanceof Markierung){
position = position + 5;
comp = markierungsPanel.getComponentAt(0,position);
}
setLocation(0,position);
int max = (int)(height - 5);
String text = "Fehler: "+reporttable.getValueAt(row,0).toString();
setToolTipText(text);
if(position > max){
setLocation(0,max);
comp = markierungsPanel.getComponentAt(0,max);
if(comp != null && comp instanceof Markierung){
comp.setBackground(Color.red);
String text1 = ((Markierung)comp).getToolTipText();
if(!text1.startsWith("<html>")) text1 = "<html>" + text1 ;
((Markierung)comp).setToolTipText(text1+"
"+text);
}
}
setCursor(new Cursor(Cursor.HAND_CURSOR));
addMouseListener(new MouseAdapter(){
public void mouseClicked(MouseEvent e){
markierungMouseClicked(e);
}
});
}
private void markierungMouseClicked(MouseEvent e){
reporttable.scrollRectToVisible(reporttable.getCellRect(row, 0, false));
reporttable.changeSelection(row,0,false,false);
}
private int row;
}
Ich hab ScrollJump nun auch so angepasst: läuft problemlos.oschli hat gesagt.:Hi das dein Programm ein Demo Programm ist war mir klar. Deshalb hab ich es ja auch angepasst...
http://www.java-forum.org/de/viewtopic.php?p=177552#177552oschli hat gesagt.:
package gui;
import java.awt.*;
import javax.swing.*;
import java.awt.Color;
import java.awt.event.*;
import java.util.Vector;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartPanel;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.plot.PiePlot;
import org.jfree.data.general.DefaultPieDataset;
public class MySMTPReport {
public MySMTPReport(){
pingsucces=0;
pingfailed=0;
total=0;
smtppanel=new JPanel();
columnNames = new Vector<String>();
columnNames.add("Date");
columnNames.add("Time");
columnNames.add("State");
columnNames.add("Replytime");
data = new Vector<Vector>();
markierungsPanel =new JPanel();
}
public void analyzePing(String date, String time,boolean succes, String replytime){
Vector<Object> row = new Vector<Object>(3);
if(succes){
pingsucces++;
total++;
row.add(date);
row.add(time);
row.add("Succeded");
row.add(replytime);
}
else{
pingfailed++;
total++;
row.add(date);
row.add(time);
row.add("Failed");
row.add(replytime);
}
data.addElement( row );
}
public void generateSMTPChart(){
south = new JPanel();
south.setLayout(new BorderLayout());
south.setPreferredSize(new Dimension(200,200));
reporttable=new JTable(data, columnNames);
scroll= new JScrollPane(reporttable);
scroll.setBackground(Color.GRAY);
south.add(scroll,BorderLayout.CENTER);
markierungsPanel.setLayout(null);
markierungsPanel.setPreferredSize(new Dimension(15, 10));
south.add(markierungsPanel, BorderLayout.EAST);
scanTable();
smtppanel.setLayout(new BorderLayout());
smtppanel.add(south,BorderLayout.CENTER);
markierungsPanel.revalidate();
markierungsPanel.repaint();
smtppanel.revalidate();
smtppanel.repaint();
}
private void scanTable(){
markierungsPanel.removeAll();
for(int row = 0; row<reporttable.getRowCount(); row++){
String value = reporttable.getValueAt(row,2).toString().trim();
if(value.equals("Failed")){
markierungsPanel.add(new Markierung(row));
}
}
markierungsPanel.revalidate();
markierungsPanel.repaint();
}
public JPanel getSMTP(){
return smtppanel;
}
private JPanel smtppanel;
private JPanel south;
private JPanel markierungsPanel;
private JScrollPane scroll;
private JTable reporttable;
private Vector <String> columnNames;
private Vector <Vector> data ;
private JPanel southeast;
private JScrollBar vsb = new JScrollBar(JScrollBar.VERTICAL);
private int pingsucces;
private int pingfailed;
private int total;
class Markierung extends JLabel{
public Markierung(int row){
this.row = row;
setBackground(Color.orange);
setBorder(BorderFactory.createLineBorder(Color.lightGray));
setOpaque(true);
setSize(new Dimension(13,5));
double rowCount = reporttable.getRowCount();
double factor = row / rowCount;
double height = markierungsPanel.getSize().getHeight();
int position = (int)(height * factor);
Component comp = markierungsPanel.getComponentAt(0,position);
while(comp != null && comp instanceof Markierung){
position = position + 5;
comp = markierungsPanel.getComponentAt(0,position);
}
setLocation(0,position);
int max = (int)(height - 5);
String text = "Fehler: "+reporttable.getValueAt(row,0).toString();
setToolTipText(text);
if(position > max){
setLocation(0,max);
comp = markierungsPanel.getComponentAt(0,max);
if(comp != null && comp instanceof Markierung){
comp.setBackground(Color.red);
String text1 = ((Markierung)comp).getToolTipText();
if(!text1.startsWith("<html>")) text1 = "<html>" + text1 ;
((Markierung)comp).setToolTipText(text1+"
"+text);
}
}
setCursor(new Cursor(Cursor.HAND_CURSOR));
addMouseListener(new MouseAdapter(){
public void mouseClicked(MouseEvent e){
markierungMouseClicked(e);
}
});
}
private void markierungMouseClicked(MouseEvent e){
reporttable.scrollRectToVisible(reporttable.getCellRect(row, 0, false));
reporttable.changeSelection(row,0,false,false);
}
private int row;
}
}
addComponentListener(new ComponentAdapter(){
public void componentResized(ComponentEvent e){
scanTable();
}
});
private void testGUI(){
for (int i = 0; i < 10000; i++) {
if(i==500 || i==5000 || i== 7000) {
analyzePing(i+" 01.01.2006 ", "11:11:00", false, "00:01:00");
}else{
analyzePing(i+" 01.01.2006 ", "11:11:00", true, "00:01:00");
}
}
reporttable = new JTable(data, columnNames);
markierungsPanel.setLayout(null);
markierungsPanel.setPreferredSize(new Dimension(15, 10));
JFrame f = new JFrame();
f.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
f.add(new JScrollPane(reporttable));
f.add(markierungsPanel, BorderLayout.EAST);
f.setSize(400,300);
f.setLocationRelativeTo(null);
f.setVisible(true);
scanTable();
}
public static void main(String args[]) {
MySMTPReport myRep = new MySMTPReport();
myRep.testGUI();
}
addComponentListener(new ComponentAdapter(){
public void componentResized(ComponentEvent e){
scanTable();
}
});