Я не понимаю, где проблема. JTable встроен в JScrollPanel, встроенный в JPanel. Таблица не отображается. Любая помощь оценивается. Я, вероятно, пропустил, чтобы добавить некоторые элементы. Проверено тщательно, но ничего не может найти. Это просто конструктор:JTable в JPanel Не отображается
public TableIssues() {
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 894, 597);
contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);
contentPane.setLayout(null);
JPanel patientsPanel = new JPanel();
patientsPanel.setBounds(6, 152, 882, 417);
patientsPanel.setLayout(null);
String[] patientsColumns = {
"one",
"two",
"three"};
String[][] tableInput={{"first","second","third"},{"first","second","third"}};
patientsTable = new JTable(tableInput,patientsColumns);
JScrollPane scroll = new JScrollPane();
scroll.setBounds(0, 0, 882, 363);
scroll.setLayout(null);
scroll.setViewportView(patientsTable);
patientsPanel.add(scroll);
JButton addPatietsButton = new JButton("Add");
addPatietsButton.setFont(new Font("Lucida Grande", Font.PLAIN, 20));
addPatietsButton.setBounds(356, 375, 211, 36);
patientsPanel.add(addPatietsButton);
contentPane.add(patientsPanel);
}
Пожалуйста, смотрите изменить, чтобы ответить с примерами кода. –