From f0aae4b39afbcbb18fb5a0b32e3ca689662c5ca7 Mon Sep 17 00:00:00 2001 From: jinlin <jinlin> Date: 星期一, 10 三月 2025 08:21:31 +0800 Subject: [PATCH] jar --- src/main/java/com/example/client/service/DismantTrackService.java | 378 ++++++++++++++++++++++++++++++++--------------------- 1 files changed, 230 insertions(+), 148 deletions(-) diff --git a/src/main/java/com/example/client/service/DismantTrackService.java b/src/main/java/com/example/client/service/DismantTrackService.java index 3e5a248..878f4b6 100644 --- a/src/main/java/com/example/client/service/DismantTrackService.java +++ b/src/main/java/com/example/client/service/DismantTrackService.java @@ -2,21 +2,14 @@ import com.example.client.dto.ColumnDto; import com.example.client.dto.JComboBoxItem; -import com.example.client.model.TableButton; import com.example.client.utils.CommonTable; import com.example.client.utils.GBC; -import com.example.client.utils.MultiSelectComboBox; import com.example.server.cabin.service.CabinService; -import com.example.server.progressTrack.Dto.NetworkNodeStatusDto; -import com.example.server.progressTrack.model.DjJdgzDismantTrack; import com.example.server.progressTrack.model.DjJdgzNetworkLevel3; -import com.example.server.progressTrack.model.DjJdgzTrackRecord; -import com.example.server.progressTrack.service.DjJdgzDismantTrackService; +import com.example.server.progressTrack.model.DjJdgzShip; import com.example.server.progressTrack.service.DjJdgzNetworkLevel3Service; -import com.example.server.progressTrack.service.NetWorkDiagramService; +import com.example.server.progressTrack.service.DjJdgzShipService; import com.example.server.teamGroup.service.SysTeamGroupClassService; -import com.mxgraph.swing.mxGraphComponent; -import com.mxgraph.view.mxGraph; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -24,7 +17,9 @@ import java.awt.*; import java.awt.event.*; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; @Service @@ -34,50 +29,128 @@ @Autowired private SysTeamGroupClassService sysTeamGroupClassService; @Autowired - private DjJdgzDismantTrackService djJdgzDismantTrackService; + private DismantTrackAddOrUpdate addOrUpdate; @Autowired private CabinService cabinService; + @Autowired + private DjJdgzShipService djJdgzShipService; + private List<DjJdgzNetworkLevel3> list; - public JPanel createTable(Integer width, Integer height) { - height = height - 100; + public JPanel createTable(Integer width, Integer height, JFrame frame) { JPanel panel = new JPanel(); + panel.setPreferredSize(new Dimension(width, height)); JPanel jLeft = new JPanel(new BorderLayout()); - JPanel top = new JPanel(new BorderLayout()); - jLeft.setPreferredSize(new Dimension(width / 3 - 20, height)); - top.setPreferredSize(new Dimension(width / 3 - 20, 100)); + + JPanel top = new JPanel(); + + jLeft.setPreferredSize(new Dimension(600, height)); + top.setPreferredSize(new Dimension(600, 100)); + + GridBagLayout layout = new GridBagLayout(); + top.setLayout(layout); // 鍒涘缓宸︿晶琛ㄦ牸 - List<ColumnDto> columnDto = new ArrayList<>(); - List<DjJdgzNetworkLevel3> list = level3Service.getList(null); //columnDto.add(new ColumnDto("ID", "id", -1, null,false)); JComboBoxItem[] deptList = sysTeamGroupClassService.getDeptList(); JComboBoxItem[] teamList = sysTeamGroupClassService.getTeamList(null); JComboBoxItem[] cabinList = cabinService.getList(); String[] typeList = new String[]{ - "鏀硅","鍔犺","鎹㈣","鏀硅繘鎬т慨鐞�" + "鏀硅", "鍔犺", "鎹㈣", "鏀硅繘鎬т慨鐞�","" }; + List<DjJdgzShip> shipList = djJdgzShipService.getList(); + Map<String, Long> shipMap = new HashMap<>(); + + JLabel JLabel0 = new JLabel("宸ョ▼"); + JComboBox comboBox = new JComboBox(); + + comboBox.setPreferredSize(new Dimension(112, 28)); + for (int i = 0; i < shipList.size(); i++) { + shipMap.put(shipList.get(i).getShipNo(), shipList.get(i).getId()); + comboBox.addItem(shipList.get(i).getShipNo()); + } + comboBox.setSelectedItem(shipList.get(0).getShipNo()); JLabel JLabel1 = new JLabel("閮ㄩ棬"); JComboBox<JComboBoxItem> comboBox1 = new JComboBox<>(deptList); - comboBox1.setPreferredSize(new Dimension(100, 28)); + comboBox1.setPreferredSize(new Dimension(112, 28)); JComboBoxItem[] teamList1 = sysTeamGroupClassService.getTeamList(deptList[0].getId()); JLabel JLabel2 = new JLabel("涓撲笟"); JComboBox<JComboBoxItem> comboBox2 = new JComboBox<>(teamList1); - comboBox2.setPreferredSize(new Dimension(100, 28)); + comboBox2.setPreferredSize(new Dimension(112, 28)); - JLabel JLabel3= new JLabel("鑸卞"); - JComboBox<JComboBoxItem> comboBox3 = new JComboBox(cabinList); - comboBox3.setPreferredSize(new Dimension(100, 28)); + JLabel JLabel3 = new JLabel("鑸卞"); + JComboBox<JComboBoxItem> comboBox3 = new JComboBox<>(cabinList); + comboBox3.setPreferredSize(new Dimension(112, 28)); JLabel JLabel4 = new JLabel("绫诲埆"); JComboBox<String> comboBox4 = new JComboBox<>(typeList); - comboBox3.setPreferredSize(new Dimension(100, 28)); + comboBox4.setPreferredSize(new Dimension(112, 28)); - JTextField sb = new JTextField(); + JTextField sb = new JTextField(10); + JButton query = new JButton("鏌ヨ"); + + top.add(JLabel0, new GBC(0, 0, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5)); + top.add(comboBox, new GBC(1, 0, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5)); + top.add(JLabel1, new GBC(2, 0, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5)); + top.add(comboBox1, new GBC(3, 0, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5)); + top.add(JLabel2, new GBC(4, 0, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5)); + top.add(comboBox2, new GBC(5, 0, 2, 1).setAnchor(GBC.SOUTHWEST).setInsets(5)); + + top.add(JLabel3, new GBC(0, 1, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5)); + top.add(comboBox3, new GBC(1, 1, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5)); + top.add(JLabel4, new GBC(2, 1, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5)); + top.add(comboBox4, new GBC(3, 1, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5)); + top.add(sb, new GBC(4, 1, 2, 1).setAnchor(GBC.SOUTHWEST).setInsets(5)); + top.add(query, new GBC(6, 1, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5)); + + jLeft.add(top, BorderLayout.NORTH); + + List<ColumnDto> columnDto = new ArrayList<>(); + list = level3Service.getList(null, deptList[0].getId(), teamList[0].getId(), cabinList[0].getId(), typeList[0],null); + + columnDto.add(new ColumnDto("搴忓彿", "", 60, "autoCreate", false, null, null)); + columnDto.add(new ColumnDto("璁惧鍚嶇О", "name", 110, null, false, null, null)); + columnDto.add(new ColumnDto("閮ㄩ棬", "deptId", 120, "dict", false, null, deptList)); + columnDto.add(new ColumnDto("涓撲笟", "teamgroupId", 120, "dict", false, null, teamList)); + columnDto.add(new ColumnDto("鑸卞", "cabinId", 100, "dict", false, null, cabinList)); + columnDto.add(new ColumnDto("绫诲埆", "type", 100, null, false, null, null)); + + JTable subTable = CommonTable.createCommonTable(list, columnDto); + subTable.setRowHeight(25); + subTable.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS); + + comboBox.addItemListener(new ItemListener() { + public void itemStateChanged(final ItemEvent event) { + String content = comboBox.getSelectedItem().toString(); + JComboBoxItem dept = (JComboBoxItem) comboBox1.getSelectedItem(); + JComboBoxItem team = (JComboBoxItem) comboBox2.getSelectedItem(); + JComboBoxItem cabin = (JComboBoxItem) comboBox3.getSelectedItem(); + String type = comboBox4.getSelectedItem().toString(); + + Long shipId = shipMap.get(content); + list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type,null); + + CommonTable.refreshTable(list, columnDto, subTable); + subTable.setRowHeight(25); + + subTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); + subTable.addMouseListener(new MouseAdapter() { + public void mouseClicked(MouseEvent e) { + // 浠呭綋榧犳爣宸﹂敭鍗曞嚮鏃跺搷搴� + if (e.getButton() == MouseEvent.BUTTON1) { + // 寰楀埌閫変腑鐨勮鍒楃殑绱㈠紩鍊� + int r = subTable.getSelectedRow(); + DjJdgzNetworkLevel3 data = list.get(r); + addOrUpdate.refreshTable(data.getId()); + } + } + }); + } + }); comboBox1.addItemListener(new ItemListener() { @Override @@ -89,42 +162,149 @@ JComboBoxItem[] teamList = sysTeamGroupClassService.getTeamList(selectedId); comboBox2.setModel(new DefaultComboBoxModel<>(teamList)); - comboBox2.setSelectedIndex(-1); + comboBox2.setSelectedIndex(0); + + String content = comboBox.getSelectedItem().toString(); + JComboBoxItem dept = (JComboBoxItem) comboBox1.getSelectedItem(); + JComboBoxItem team = (JComboBoxItem) comboBox2.getSelectedItem(); + JComboBoxItem cabin = (JComboBoxItem) comboBox3.getSelectedItem(); + String type = comboBox4.getSelectedItem().toString(); + + Long shipId = shipMap.get(content); + list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type,null); + + CommonTable.refreshTable(list, columnDto, subTable); + subTable.setRowHeight(25); + + subTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); + subTable.addMouseListener(new MouseAdapter() { + public void mouseClicked(MouseEvent e) { + // 浠呭綋榧犳爣宸﹂敭鍗曞嚮鏃跺搷搴� + if (e.getButton() == MouseEvent.BUTTON1) { + // 寰楀埌閫変腑鐨勮鍒楃殑绱㈠紩鍊� + int r = subTable.getSelectedRow(); + DjJdgzNetworkLevel3 data = list.get(r); + addOrUpdate.refreshTable(data.getId()); + } + } + }); } } } }); - top.add(JLabel1, new GBC(0, 0, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5)); - top.add(comboBox1, new GBC(1, 0, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5)); - top.add(JLabel2, new GBC(2, 0, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5)); - top.add(comboBox2, new GBC(3, 0, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5)); + comboBox2.addItemListener(new ItemListener() { + public void itemStateChanged(final ItemEvent event) { + String content = comboBox.getSelectedItem().toString(); + JComboBoxItem dept = (JComboBoxItem) comboBox1.getSelectedItem(); + JComboBoxItem team = (JComboBoxItem) comboBox2.getSelectedItem(); + JComboBoxItem cabin = (JComboBoxItem) comboBox3.getSelectedItem(); + String type = comboBox4.getSelectedItem().toString(); - top.add(JLabel3, new GBC(0, 1, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5)); - top.add(comboBox3, new GBC(1, 1, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5)); - top.add(JLabel4, new GBC(2, 1, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5)); - top.add(comboBox4, new GBC(3, 1, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5)); + Long shipId = shipMap.get(content); + list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type,null); - top.add(sb, new GBC(0, 2, 2, 1).setAnchor(GBC.SOUTHWEST).setInsets(5)); + CommonTable.refreshTable(list, columnDto, subTable); + subTable.setRowHeight(25); - jLeft.add(top,BorderLayout.NORTH); + subTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); + subTable.addMouseListener(new MouseAdapter() { + public void mouseClicked(MouseEvent e) { + // 浠呭綋榧犳爣宸﹂敭鍗曞嚮鏃跺搷搴� + if (e.getButton() == MouseEvent.BUTTON1) { + // 寰楀埌閫変腑鐨勮鍒楃殑绱㈠紩鍊� + int r = subTable.getSelectedRow(); + DjJdgzNetworkLevel3 data = list.get(r); + addOrUpdate.refreshTable(data.getId()); + } + } + }); + } + }); + comboBox3.addItemListener(new ItemListener() { + public void itemStateChanged(final ItemEvent event) { + String content = comboBox.getSelectedItem().toString(); + JComboBoxItem dept = (JComboBoxItem) comboBox1.getSelectedItem(); + JComboBoxItem team = (JComboBoxItem) comboBox2.getSelectedItem(); + JComboBoxItem cabin = (JComboBoxItem) comboBox3.getSelectedItem(); + String type = comboBox4.getSelectedItem().toString(); - columnDto.add(new ColumnDto("搴忓彿", "", width / 20 - 10, "autoCreate", false, null,null)); - columnDto.add(new ColumnDto("閮ㄩ棬", "deptId", width / 18, "dict", false, null,deptList)); - columnDto.add(new ColumnDto("涓撲笟", "teamgroupId", width / 18, "dict", false, null,teamList)); - columnDto.add(new ColumnDto("鑸卞", "cabinId", width / 18, "dicts", false, null,cabinList)); - columnDto.add(new ColumnDto("绫诲埆", "type", width / 18, null, false, null,null)); - columnDto.add(new ColumnDto("璁惧鍚嶇О", "name", width / 18, null, false, null,null)); + Long shipId = shipMap.get(content); + list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type,null); - JTable subTable = CommonTable.createCommonTable(list, columnDto); - subTable.setRowHeight(25); - subTable.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS); + CommonTable.refreshTable(list, columnDto, subTable); + subTable.setRowHeight(25); + + subTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); + subTable.addMouseListener(new MouseAdapter() { + public void mouseClicked(MouseEvent e) { + // 浠呭綋榧犳爣宸﹂敭鍗曞嚮鏃跺搷搴� + if (e.getButton() == MouseEvent.BUTTON1) { + // 寰楀埌閫変腑鐨勮鍒楃殑绱㈠紩鍊� + int r = subTable.getSelectedRow(); + DjJdgzNetworkLevel3 data = list.get(r); + addOrUpdate.refreshTable(data.getId()); + } + } + }); + } + }); + comboBox4.addItemListener(new ItemListener() { + public void itemStateChanged(final ItemEvent event) { + String content = comboBox.getSelectedItem().toString(); + JComboBoxItem dept = (JComboBoxItem) comboBox1.getSelectedItem(); + JComboBoxItem team = (JComboBoxItem) comboBox2.getSelectedItem(); + JComboBoxItem cabin = (JComboBoxItem) comboBox3.getSelectedItem(); + String type = comboBox4.getSelectedItem().toString(); + + Long shipId = shipMap.get(content); + list = level3Service.getList(shipId, dept.getId(), team.getId(), cabin.getId(), type,null); + + CommonTable.refreshTable(list, columnDto, subTable); + subTable.setRowHeight(25); + + subTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); + subTable.addMouseListener(new MouseAdapter() { + public void mouseClicked(MouseEvent e) { + // 浠呭綋榧犳爣宸﹂敭鍗曞嚮鏃跺搷搴� + if (e.getButton() == MouseEvent.BUTTON1) { + // 寰楀埌閫変腑鐨勮鍒楃殑绱㈠紩鍊� + int r = subTable.getSelectedRow(); + DjJdgzNetworkLevel3 data = list.get(r); + addOrUpdate.refreshTable(data.getId()); + } + } + }); + } + }); + + query.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + list = level3Service.getList(null, null, null, null, null,sb.getText()); + + CommonTable.refreshTable(list, columnDto, subTable); + subTable.setRowHeight(25); + + subTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); + subTable.addMouseListener(new MouseAdapter() { + public void mouseClicked(MouseEvent e) { + // 浠呭綋榧犳爣宸﹂敭鍗曞嚮鏃跺搷搴� + if (e.getButton() == MouseEvent.BUTTON1) { + // 寰楀埌閫変腑鐨勮鍒楃殑绱㈠紩鍊� + int r = subTable.getSelectedRow(); + DjJdgzNetworkLevel3 data = list.get(r); + addOrUpdate.refreshTable(data.getId()); + } + } + }); + } + }); JScrollPane scrollTable = new JScrollPane(subTable); jLeft.add(scrollTable, BorderLayout.CENTER); - JTable trackTable = new JTable(); - JPanel track = this.createTrack(width,height,list.get(0),trackTable); - trackTable.setPreferredSize(new Dimension(width - width / 3, height)); + JPanel track = addOrUpdate.createTrack(width - 620, height, list.get(0),frame); + // 鍒涘缓姘村钩鍒嗗壊闈㈡澘 JSplitPane hSplitPane = new JSplitPane( @@ -132,7 +312,7 @@ jLeft, track ); - hSplitPane.setDividerLocation(width / 4); + hSplitPane.setDividerLocation(620); hSplitPane.setDividerSize(10); hSplitPane.setOneTouchExpandable(true); hSplitPane.setContinuousLayout(true); @@ -146,108 +326,10 @@ // 寰楀埌閫変腑鐨勮鍒楃殑绱㈠紩鍊� int r = subTable.getSelectedRow(); DjJdgzNetworkLevel3 data = list.get(r); + addOrUpdate.refreshTable(data.getId()); } } }); - - return panel; - } - - private JPanel createTrack(Integer width, Integer height, DjJdgzNetworkLevel3 djJdgzNetworkLevel3, JTable trackTable) { - JPanel panel = new JPanel(); - - JPanel topJpanel = new JPanel(new FlowLayout(FlowLayout.LEFT)); - topJpanel.setPreferredSize(new Dimension(width, 37)); - topJpanel.setBackground(Color.WHITE); - - JPanel centerJpanel = new JPanel(); - centerJpanel.setPreferredSize(new Dimension(width - 20, height - 100)); - centerJpanel.setBackground(Color.WHITE); - panel.add(topJpanel, BorderLayout.NORTH); - panel.add(centerJpanel, BorderLayout.CENTER); - - JComboBoxItem[] cabinList = cabinService.getList(); - String[] typeList = new String[]{ - "鏀硅","鍔犺","鎹㈣","鏀硅繘鎬т慨鐞�" - }; - - JComboBox<JComboBoxItem> comboBox = new JComboBox(cabinList); - comboBox.setPreferredSize(new Dimension(100, 28)); - - JComboBox<String> comboBox2 = new JComboBox<>(typeList); - comboBox2.setPreferredSize(new Dimension(100, 28)); - - JButton btnTj = new JButton("缁熻鎶ヨ〃"); - JButton btnExport = new JButton("瀵煎嚭鎷嗗嵏鎶ヨ〃"); - - topJpanel.add(btnTj); - topJpanel.add(btnExport); - topJpanel.add(comboBox); - topJpanel.add(comboBox2); - - comboBox.setPreferredSize(new Dimension(300, 28)); - comboBox2.setPreferredSize(new Dimension(300, 28)); - - List<DjJdgzDismantTrack> list = djJdgzDismantTrackService.getList(djJdgzNetworkLevel3.getId(),null); - List<TableButton> buttonList = new ArrayList<>(); - buttonList.add(new TableButton("edit", "缂栬緫")); - - // 鍒涘缓宸︿晶琛ㄦ牸 - List<ColumnDto> columnDto = new ArrayList<>(); - //columnDto.add(new ColumnDto("ID", "id", -1, null,false)); - columnDto.add(new ColumnDto("搴忓彿", "", 50, "autoCreate", false, null, null)); - columnDto.add(new ColumnDto("閮ㄩ棬", "deptId", 160, null, false, null, null)); - columnDto.add(new ColumnDto("涓撲笟", "teamgroupId", 160, null, false, null, null)); - columnDto.add(new ColumnDto("鑸卞", "cabinId", 120, null, false, null, null)); - columnDto.add(new ColumnDto("閮ㄤ欢鍚嶇О", "name", 200, null, false, null, null)); - columnDto.add(new ColumnDto("鎷嗗嵏鏃堕棿", "dismantTime", 200, null, false, null, null)); - columnDto.add(new ColumnDto("鎷嗗嵏鍗曚綅", "dismantUnit", 200, null, false, null, null)); - columnDto.add(new ColumnDto("鎷嗗嵏浜哄憳", "dismantStaff", 200, null, false, null, null)); - columnDto.add(new ColumnDto("鎷嗗嵏鍔╀慨鑹囧憳", "dismantAssistant", 200, null, false, null, null)); - columnDto.add(new ColumnDto("鍑鸿埍鏃堕棿", "exitTime", 200, "", true, buttonList, null)); - columnDto.add(new ColumnDto("鍑鸿埍鍗曚綅", "exitUnit", 200, null, false, null, null)); - columnDto.add(new ColumnDto("鍑鸿埍浜哄憳", "exitStaff", 200, null, false, null, null)); - columnDto.add(new ColumnDto("鍑鸿埍鍔╀慨鑹囧憳", "exitAssistant", 200, null, false, null, null)); - columnDto.add(new ColumnDto("閫�閲嶆椂闂�", "returnWeightTime", 200, null, false, null, null)); - columnDto.add(new ColumnDto("绉伴噸鍛�", "weigher", 200, null, false, null, null)); - columnDto.add(new ColumnDto("閫�閲嶉噸閲�", "returnWeight", 200, null, false, null, null)); - columnDto.add(new ColumnDto("閫�閲嶅姪淇墖鍛�", "returnWeightAssistant", 200, null, false, null, null)); - columnDto.add(new ColumnDto("鍏ュ簱鏃堕棿", "warehouseTime", 200, null, false, null, null)); - columnDto.add(new ColumnDto("鍏ュ簱浜哄憳", "warehouseStaff", 200, null, false, null, null)); - columnDto.add(new ColumnDto("褰撳墠瀛樻斁浣嶇疆", "currentLocation", 200, null, false, null, null)); - - trackTable = CommonTable.createCommonTable(list, columnDto); - trackTable.setRowHeight(25); - trackTable.setAutoCreateRowSorter(true); - trackTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); - - trackTable.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent e) { - - } - }); - - btnTj.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - - } - }); - - btnExport.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - - } - }); - - - JScrollPane scrollPane = new JScrollPane(trackTable, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); - scrollPane.setViewportView(trackTable); - scrollPane.getViewport().setBackground(Color.WHITE); - scrollPane.setPreferredSize(new Dimension(width - 20, height - 120)); - centerJpanel.add(scrollPane); return panel; } -- Gitblit v1.9.1