I want mine to JLabelcover the whole frame, but when I do this, it will not close the text box and the ok button. how to make mine JLabelto cover the whole frame.
JLabel
P / s I want to do this JLabelas a background, so I can put the icon in JLabelas a background image.
Here is what I will do. Use JPanelfor background and enter some custom code.
JPanel
Drag JPaneland drop into the shape to cover the entire frame to be the background.
JPanel . . .
jPanel1 = new JPanel() { BufferedImage img; { try { img = ImageIO.read(getClass().getResource("/resources/stackoverflow5.png")); } catch (IOException ex) { ex.printStackTrace(); } } @Override protected void paintComponent(Graphics g) { super.paintComponent(g); g.drawImage(img, 0, 0, getWidth(), getHeight(), this); } };
, , . Ctrl + Shift + I
.
, , . , Jpanel Jlabel Jframe, :
1) Jframe. 2) 3) " " 4) Jlabel, , . , .
p/s: , - , . .
Source: https://habr.com/ru/post/1535033/More articles:initialization of "unused" is skipped by "goto label" - why do I get it for std :: string, but not for int? - c ++Чтение данных из определенного файла CSV и отображение его в JTable - javaPopUp activity starts again when it is launched from the "latest applications" - androidForm binding form for flags - phphttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1535032/how-to-change-background-color-of-jdesktoppane-which-is-created-usning-tools-in-netbeans&usg=ALkJrhinmOMoMRY9qrMArw_fhf2DeymXTgSonarqube 4.2 will not start, but there is no log file - sonarqubeExtract offline messages using asmack - androidhow to enable plugin in django-tinymce? - pythonResolving MSB3247 Conflicts Between Different Versions - When Binding Forwarding Already Exists - .netHow can I distinguish between Xtext, Xtend, and similar Eclipse technologies? - xtextAll Articles