if i directly use vlcj to show full screen then it's ok,but when i initially set a fixed size and later on the fly set it to full screen then it losts it's rendering, code:
panel_canvas=new JPanel(new BorderLayout());
panel_canvas.add(windowsCanvas,BorderLayout.CENTER);
mediaPlayerFactory = new MediaPlayerFactory("--no-video-title-show");
mediaPlayer = mediaPlayerFactory.newEmbeddedMediaPlayer();
mediaPlayer.setVideoSurface(mediaPlayerFactory.newVideoSurface(windowsCanvas));
frame.setContentPane(panel_canvas);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setLocationRelativeTo(null);
frame.setSize(600,500);
frame.setVisible(true);
but if i use a process when press "enter" it will be full screen then it fails
frame.getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("released ENTER"), "RELEASED_ENTER");
frame.getRootPane().getActionMap().put("RELEASED_ENTER", new AbstractAction() {
@Override
public void actionPerformed(ActionEvent e) {
if(!frame.isUndecorated()){
pres_size=frame.getSize();
prev_location=frame.getLocation();
frame.dispose();
frame.setUndecorated(true);
frame.setExtendedState(JFrame.MAXIMIZED_BOTH);
frame.setVisible(true);
}