@@ -160,9 +160,10 @@ public void keyTyped(KeyEvent e) {
160
160
"Android applications must specifically ask for permission\n " +
161
161
"to do things like connect to the internet, write a file,\n " +
162
162
"or make phone calls. When installing your application,\n " +
163
- "users will be asked whether they want to allow such access.\n " +
164
- "More about permissions can be found " +
165
- "<a href=\" " + GUIDE_URL + "\" >here</a>.</body></html>" ;
163
+ "users will be asked whether they want to allow such access.</html>" ;
164
+ String urlText = "<html>More about permissions can be found " +
165
+ "<a href=\" " + GUIDE_URL + "\" >here</a>.</html>" ;
166
+
166
167
// "<html>" +
167
168
// "Android applications must specifically ask for permission\n" +
168
169
// "to do things like connect to the internet, write a file,\n" +
@@ -174,6 +175,7 @@ public void keyTyped(KeyEvent e) {
174
175
// JTextArea textarea = new JTextArea(5, 40);
175
176
// textarea.setText(labelText);
176
177
JLabel textarea = new JLabel (labelText );
178
+ JLabel urlarea = new JLabel (urlText );
177
179
// JLabel textarea = new JLabel(labelText) {
178
180
// public Dimension getPreferredSize() {
179
181
// return new Dimension(400, 100);
@@ -185,14 +187,17 @@ public void keyTyped(KeyEvent e) {
185
187
// return getPreferredSize();
186
188
// }
187
189
// };
188
- textarea .setPreferredSize (new Dimension (400 , 100 ));
189
- textarea .addMouseListener (new MouseAdapter () {
190
+ textarea .setPreferredSize (new Dimension (400 , 80 ));
191
+ urlarea .setPreferredSize (new Dimension (400 , 30 ));
192
+ urlarea .addMouseListener (new MouseAdapter () {
190
193
public void mouseClicked (MouseEvent e ) {
191
194
Platform .openURL (GUIDE_URL );
192
195
}
193
196
});
197
+ urlarea .setCursor (new java .awt .Cursor (java .awt .Cursor .HAND_CURSOR ));
194
198
//textarea.setHorizontalAlignment(SwingConstants.LEFT);
195
199
textarea .setAlignmentX (LEFT_ALIGNMENT );
200
+ urlarea .setAlignmentX (LEFT_ALIGNMENT );
196
201
197
202
// textarea.setBorder(new EmptyBorder(13, 8, 13, 8));
198
203
@@ -202,6 +207,7 @@ public void mouseClicked(MouseEvent e) {
202
207
// textarea.setHighlighter(null);
203
208
// textarea.setFont(new Font("Dialog", Font.PLAIN, 12));
204
209
pain .add (textarea );
210
+ pain .add (urlarea );
205
211
// textarea.setForeground(Color.RED);
206
212
// pain.setBackground(Color.GREEN);
207
213
0 commit comments