관리 메뉴

LIFE & IT

Swing Table 관련 Issues 본문

프로그래밍/JAVA

Swing Table 관련 Issues

프린이! 2019. 8. 31. 04:18

1. 사용자의 model 의 cell 값 수정 방지

	model = new DefaultTableModel(rowCount, columnCount) {
			@Override
			public boolean isCellEditable(int row, int column) {
				// TODO Auto-generated method stub
				return false;
			}
		};

 

 

2. 사용자의 마우스 드래그로 인한 table 위치 값 변경 방지

	table = new JTable(model); // 테이블 생성
    
		// user의 mouse drag 로 인한 table 조정 값 변경 불가능.
		table.getTableHeader().setReorderingAllowed(false); 

※ 2번 이슈  :  https://stackoverflow.com/questions/17641123/jtable-disable-user-column-dragging

'프로그래밍 > JAVA' 카테고리의 다른 글

공공API data 활용(1)  (0) 2021.01.28
JAVA JVM 메모리 구조  (0) 2020.01.15
자바 쓰레드 기초(Java Thread Basic)  (0) 2020.01.03
자바 메모리 관리 - 스택 & 힙  (0) 2020.01.03