我只想知道在 MatLab 应用程序中包含 Java 代码是否是 MatLab 的“有效”功能,或者它是否是未记录的功能?
例如,做这样的事情
% Creates de Frame
f = javax.swing.JFrame();
f.setSize(400,400);
topPanel = javax.swing.JPanel();
topPanel.setLayout(java.awt.BorderLayout);
f.getContentPane().add(topPanel);
% Create the panel for tab 1
panel1 = javax.swing.JPanel();
panel1.setLayout('');
label1 = javax.swing.JLabel('Username:');
label1.setBounds(10, 15, 100, 35);
panel1.add(label1);
nameField = javax.swing.JTextField();
nameField.setBounds(10, 40, 150, 20);
panel1.add(nameField);
label2 = javax.swing.JLabel('Password:');
label2.setBounds(10, 60, 150, 20);
panel1.add(label2);
fieldPass = javax.swing.JPasswordField();
fieldPass.setBounds(10, 80, 150, 20);
panel1.add(fieldPass);
btnAceptar = javax.swing.JButton('OK');
btnAceptar.setBounds(10, 180, 100, 40);
panel1.add(btnAceptar);
set(btnAceptar,'MouseReleasedCallback', @(handle,evt)...
helpdlg([ 'The user names is: ' char(nameField.getText()) ] ));
panel2 = javax.swing.JPanel();
panel2.setLayout(java.awt.GridLayout(3, 2));
panel2.add(javax.swing.JLabel('Field 1:'));
panel2.add(javax.swing.JTextField());
panel2.add(javax.swing.JLabel('Field 2:'));
panel2.add(javax.swing.JTextField());
% Create a tabbed pane
tabbedPane = javax.swing.JTabbedPane();
tabbedPane.addTab('MyTab1', panel1);
tabbedPane.addTab('MyTab2', panel2);
topPanel.add(tabbedPane, java.awt.BorderLayout.CENTER);
f.show;
waitfor(f);
是(未)记录的功能吗?
提前致谢。