프로그램은 JTabel을 인쇄하고 사용되는 함수는JTable 헤더를 2 행으로 인쇄하는 방법은?
입니다.JTabel jt=new JTable();
MessageFormat headerFormat= new MessageFormat("My World Tomorrow");
MessageFormat footerFormat = new MessageFormat("Page {0}");
jt.Print(JTabel.Format,headerFormat,footerFormat);
My World
Tomorrow
두 줄로 머리글을 인쇄하는 방법 다음과 같은 솔루션에 지칠 것 :
new MessageFormat("My world \n Tomorrow");
new MessageFormat("My world \r\n Tomorrow");
new MessageFormat("My world" System.getProperty("line.separator")+"Tomorrow"
) ;
아무 것도 작동하지 않습니다.
에 오신 것을 환영합니다 여기에 게시. 코드를 게시 할 때 4 칸만큼 들여 쓰거나 코드를 강조 표시하고 질문을 편집 할 때 코드 서식 버튼을 누릅니다. 읽는 것이 훨씬 쉬워지고 답을 얻을 확률이 높아집니다. –
안녕하세요 폴. –
하나의 백 슬래시 (\)를 사용해 보셨습니까? –