Merge lp:~tapaal-contributor/tapaal/raw-query-output into lp:tapaal
- raw-query-output
- Merge into trunk
Proposed by
Lena Ernstsen
Status: | Merged |
---|---|
Approved by: | Jiri Srba |
Approved revision: | 1115 |
Merged at revision: | 1116 |
Proposed branch: | lp:~tapaal-contributor/tapaal/raw-query-output |
Merge into: | lp:tapaal |
Diff against target: |
271 lines (+87/-23) 8 files modified
src/dk/aau/cs/approximation/ApproximationWorker.java (+2/-2) src/dk/aau/cs/verification/ModelChecker.java (+1/-0) src/dk/aau/cs/verification/UPPAAL/Verifyta.java (+1/-1) src/dk/aau/cs/verification/VerificationResult.java (+26/-6) src/dk/aau/cs/verification/VerifyTAPN/VerifyPN.java (+1/-1) src/dk/aau/cs/verification/VerifyTAPN/VerifyTAPN.java (+1/-1) src/dk/aau/cs/verification/VerifyTAPN/VerifyTAPNDiscreteVerification.java (+1/-1) src/pipe/gui/RunVerification.java (+54/-11) |
To merge this branch: | bzr merge lp:~tapaal-contributor/tapaal/raw-query-output |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jiri Srba | Approve | ||
Review via email: mp+395465@code.launchpad.net |
Commit message
Added button in "verification result" to display raw query output
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'src/dk/aau/cs/approximation/ApproximationWorker.java' | |||
2 | --- src/dk/aau/cs/approximation/ApproximationWorker.java 2020-03-26 12:31:31 +0000 | |||
3 | +++ src/dk/aau/cs/approximation/ApproximationWorker.java 2020-12-16 21:23:18 +0000 | |||
4 | @@ -308,7 +308,8 @@ | |||
5 | 308 | decomposeTrace(result.getSecondaryTrace(), transformedModel.value2(), model), | 308 | decomposeTrace(result.getSecondaryTrace(), transformedModel.value2(), model), |
6 | 309 | result.verificationTime(), | 309 | result.verificationTime(), |
7 | 310 | result.stats(), | 310 | result.stats(), |
9 | 311 | result.isSolvedUsingStateEquation()); | 311 | result.isSolvedUsingStateEquation(), |
10 | 312 | result.getRawOutput()); | ||
11 | 312 | toReturn.setNameMapping(transformedModel.value2()); | 313 | toReturn.setNameMapping(transformedModel.value2()); |
12 | 313 | } | 314 | } |
13 | 314 | 315 | ||
14 | @@ -468,7 +469,6 @@ | |||
15 | 468 | verificationResult.stats(), | 469 | verificationResult.stats(), |
16 | 469 | verificationResult.isSolvedUsingStateEquation()); | 470 | verificationResult.isSolvedUsingStateEquation()); |
17 | 470 | value.setNameMapping(composedModel.value2()); | 471 | value.setNameMapping(composedModel.value2()); |
18 | 471 | |||
19 | 472 | } | 472 | } |
20 | 473 | } | 473 | } |
21 | 474 | } | 474 | } |
22 | 475 | 475 | ||
23 | === modified file 'src/dk/aau/cs/verification/ModelChecker.java' | |||
24 | --- src/dk/aau/cs/verification/ModelChecker.java 2020-05-25 08:40:31 +0000 | |||
25 | +++ src/dk/aau/cs/verification/ModelChecker.java 2020-12-16 21:23:18 +0000 | |||
26 | @@ -26,4 +26,5 @@ | |||
27 | 26 | boolean supportsQuery(TimedArcPetriNet model, TAPNQuery query, VerificationOptions options); | 26 | boolean supportsQuery(TimedArcPetriNet model, TAPNQuery query, VerificationOptions options); |
28 | 27 | 27 | ||
29 | 28 | String[] getStatsExplanations(); | 28 | String[] getStatsExplanations(); |
30 | 29 | |||
31 | 29 | } | 30 | } |
32 | 30 | 31 | ||
33 | === modified file 'src/dk/aau/cs/verification/UPPAAL/Verifyta.java' | |||
34 | --- src/dk/aau/cs/verification/UPPAAL/Verifyta.java 2020-05-25 08:40:31 +0000 | |||
35 | +++ src/dk/aau/cs/verification/UPPAAL/Verifyta.java 2020-12-16 21:23:18 +0000 | |||
36 | @@ -340,7 +340,7 @@ | |||
37 | 340 | return new VerificationResult<TimedArcPetriNetTrace>(errorOutput + System.getProperty("line.separator") + standardOutput, runner.getRunningTime()); | 340 | return new VerificationResult<TimedArcPetriNetTrace>(errorOutput + System.getProperty("line.separator") + standardOutput, runner.getRunningTime()); |
38 | 341 | } else { | 341 | } else { |
39 | 342 | TimedArcPetriNetTrace tapnTrace = parseTrace(errorOutput, options, model, exportedModel, query, queryResult); | 342 | TimedArcPetriNetTrace tapnTrace = parseTrace(errorOutput, options, model, exportedModel, query, queryResult); |
41 | 343 | return new VerificationResult<TimedArcPetriNetTrace>(queryResult, tapnTrace, runner.getRunningTime()); | 343 | return new VerificationResult<TimedArcPetriNetTrace>(queryResult, tapnTrace, runner.getRunningTime(), standardOutput); |
42 | 344 | } | 344 | } |
43 | 345 | } | 345 | } |
44 | 346 | } | 346 | } |
45 | 347 | 347 | ||
46 | === modified file 'src/dk/aau/cs/verification/VerificationResult.java' | |||
47 | --- src/dk/aau/cs/verification/VerificationResult.java 2020-07-22 09:47:17 +0000 | |||
48 | +++ src/dk/aau/cs/verification/VerificationResult.java 2020-12-16 21:23:18 +0000 | |||
49 | @@ -15,6 +15,7 @@ | |||
50 | 15 | private QueryResult queryResult; | 15 | private QueryResult queryResult; |
51 | 16 | private TTrace trace; | 16 | private TTrace trace; |
52 | 17 | private String errorMessage = null; | 17 | private String errorMessage = null; |
53 | 18 | private String rawOutput = null; | ||
54 | 18 | private long verificationTime = 0; | 19 | private long verificationTime = 0; |
55 | 19 | private Stats stats; | 20 | private Stats stats; |
56 | 20 | private NameMapping nameMapping; | 21 | private NameMapping nameMapping; |
57 | @@ -25,20 +26,26 @@ | |||
58 | 25 | return queryResult.isQuerySatisfied(); | 26 | return queryResult.isQuerySatisfied(); |
59 | 26 | } | 27 | } |
60 | 27 | 28 | ||
62 | 28 | public VerificationResult(QueryResult queryResult, TTrace trace, long verificationTime, Stats stats){ | 29 | public VerificationResult(QueryResult queryResult, TTrace trace, long verificationTime, Stats stats, String rawOutput){ |
63 | 29 | this.queryResult = queryResult; | 30 | this.queryResult = queryResult; |
64 | 30 | this.trace = trace; | 31 | this.trace = trace; |
65 | 31 | this.verificationTime = verificationTime; | 32 | this.verificationTime = verificationTime; |
66 | 32 | this.stats = stats; | 33 | this.stats = stats; |
67 | 34 | this.rawOutput = rawOutput; | ||
68 | 33 | } | 35 | } |
69 | 36 | |||
70 | 37 | public VerificationResult(QueryResult queryResult, TTrace trace, long verificationTime, Stats stats, boolean isSolvedUsingStateEquation){ | ||
71 | 38 | this(queryResult, trace, verificationTime, stats, null); | ||
72 | 39 | this.isSolvedUsingStateEquation = isSolvedUsingStateEquation; | ||
73 | 40 | } | ||
74 | 34 | 41 | ||
77 | 35 | public VerificationResult(QueryResult queryResult, TTrace trace, long verificationTime, Stats stats, boolean isSolvedUsingStateEquation){ | 42 | public VerificationResult(QueryResult queryResult, TTrace trace, long verificationTime, Stats stats, boolean isSolvedUsingStateEquation, String rawOutput){ |
78 | 36 | this(queryResult, trace, verificationTime, stats); | 43 | this(queryResult, trace, verificationTime, stats, rawOutput); |
79 | 37 | this.isSolvedUsingStateEquation = isSolvedUsingStateEquation; | 44 | this.isSolvedUsingStateEquation = isSolvedUsingStateEquation; |
80 | 38 | } | 45 | } |
81 | 39 | 46 | ||
84 | 40 | public VerificationResult(QueryResult queryResult, TTrace trace, long verificationTime) { | 47 | public VerificationResult(QueryResult queryResult, TTrace trace, long verificationTime, String rawOutput) { |
85 | 41 | this(queryResult, trace, verificationTime, new NullStats()); | 48 | this(queryResult, trace, verificationTime, new NullStats(), rawOutput); |
86 | 42 | } | 49 | } |
87 | 43 | 50 | ||
88 | 44 | public VerificationResult(String outputMessage, long verificationTime) { | 51 | public VerificationResult(String outputMessage, long verificationTime) { |
89 | @@ -51,10 +58,19 @@ | |||
90 | 51 | TTrace secondaryTrace2, long runningTime, | 58 | TTrace secondaryTrace2, long runningTime, |
91 | 52 | Stats value2, | 59 | Stats value2, |
92 | 53 | boolean isSolvedUsingStateEquation) { | 60 | boolean isSolvedUsingStateEquation) { |
94 | 54 | this(value1, tapnTrace, runningTime, value2, isSolvedUsingStateEquation); | 61 | this(value1, tapnTrace, runningTime, value2, isSolvedUsingStateEquation, null); |
95 | 55 | this.secondaryTrace = secondaryTrace2; | 62 | this.secondaryTrace = secondaryTrace2; |
96 | 56 | } | 63 | } |
97 | 57 | 64 | ||
98 | 65 | public VerificationResult(QueryResult value1, | ||
99 | 66 | TTrace tapnTrace, | ||
100 | 67 | TTrace secondaryTrace2, long runningTime, | ||
101 | 68 | Stats value2, | ||
102 | 69 | boolean isSolvedUsingStateEquation, String rawOutput) { | ||
103 | 70 | this(value1, tapnTrace, runningTime, value2, isSolvedUsingStateEquation, rawOutput); | ||
104 | 71 | this.secondaryTrace = secondaryTrace2; | ||
105 | 72 | } | ||
106 | 73 | |||
107 | 58 | public NameMapping getNameMapping() { | 74 | public NameMapping getNameMapping() { |
108 | 59 | return nameMapping; | 75 | return nameMapping; |
109 | 60 | } | 76 | } |
110 | @@ -206,4 +222,8 @@ | |||
111 | 206 | buffer.append(stats.getEdges()); | 222 | buffer.append(stats.getEdges()); |
112 | 207 | return buffer.toString(); | 223 | return buffer.toString(); |
113 | 208 | } | 224 | } |
114 | 225 | |||
115 | 226 | public String getRawOutput() { | ||
116 | 227 | return rawOutput; | ||
117 | 228 | } | ||
118 | 209 | } | 229 | } |
119 | 210 | 230 | ||
120 | === modified file 'src/dk/aau/cs/verification/VerifyTAPN/VerifyPN.java' | |||
121 | --- src/dk/aau/cs/verification/VerifyTAPN/VerifyPN.java 2020-08-07 11:05:29 +0000 | |||
122 | +++ src/dk/aau/cs/verification/VerifyTAPN/VerifyPN.java 2020-12-16 21:23:18 +0000 | |||
123 | @@ -333,7 +333,7 @@ | |||
124 | 333 | ctlOutput = queryResult.value1().isCTL; | 333 | ctlOutput = queryResult.value1().isCTL; |
125 | 334 | boolean approximationResult = queryResult.value2().discoveredStates() == 0; // Result is from over-approximation | 334 | boolean approximationResult = queryResult.value2().discoveredStates() == 0; // Result is from over-approximation |
126 | 335 | TimedArcPetriNetTrace tapnTrace = parseTrace(errorOutput, options, model, exportedModel, query, queryResult.value1()); | 335 | TimedArcPetriNetTrace tapnTrace = parseTrace(errorOutput, options, model, exportedModel, query, queryResult.value1()); |
128 | 336 | return new VerificationResult<TimedArcPetriNetTrace>(queryResult.value1(), tapnTrace, runner.getRunningTime(), queryResult.value2(), approximationResult); | 336 | return new VerificationResult<TimedArcPetriNetTrace>(queryResult.value1(), tapnTrace, runner.getRunningTime(), queryResult.value2(), approximationResult, standardOutput); |
129 | 337 | } | 337 | } |
130 | 338 | } | 338 | } |
131 | 339 | } | 339 | } |
132 | 340 | 340 | ||
133 | === modified file 'src/dk/aau/cs/verification/VerifyTAPN/VerifyTAPN.java' | |||
134 | --- src/dk/aau/cs/verification/VerifyTAPN/VerifyTAPN.java 2020-08-06 13:48:04 +0000 | |||
135 | +++ src/dk/aau/cs/verification/VerifyTAPN/VerifyTAPN.java 2020-12-16 21:23:18 +0000 | |||
136 | @@ -318,7 +318,7 @@ | |||
137 | 318 | return new VerificationResult<TimedArcPetriNetTrace>(errorOutput + System.getProperty("line.separator") + standardOutput, runner.getRunningTime()); | 318 | return new VerificationResult<TimedArcPetriNetTrace>(errorOutput + System.getProperty("line.separator") + standardOutput, runner.getRunningTime()); |
138 | 319 | } else { | 319 | } else { |
139 | 320 | TimedArcPetriNetTrace tapnTrace = parseTrace(errorOutput, options, model, exportedModel, query, queryResult.value1()); | 320 | TimedArcPetriNetTrace tapnTrace = parseTrace(errorOutput, options, model, exportedModel, query, queryResult.value1()); |
141 | 321 | return new VerificationResult<TimedArcPetriNetTrace>(queryResult.value1(), tapnTrace, runner.getRunningTime(), queryResult.value2()); | 321 | return new VerificationResult<TimedArcPetriNetTrace>(queryResult.value1(), tapnTrace, runner.getRunningTime(), queryResult.value2(), standardOutput); |
142 | 322 | } | 322 | } |
143 | 323 | } | 323 | } |
144 | 324 | } | 324 | } |
145 | 325 | 325 | ||
146 | === modified file 'src/dk/aau/cs/verification/VerifyTAPN/VerifyTAPNDiscreteVerification.java' | |||
147 | --- src/dk/aau/cs/verification/VerifyTAPN/VerifyTAPNDiscreteVerification.java 2020-09-27 13:29:09 +0000 | |||
148 | +++ src/dk/aau/cs/verification/VerifyTAPN/VerifyTAPNDiscreteVerification.java 2020-12-16 21:23:18 +0000 | |||
149 | @@ -340,7 +340,7 @@ | |||
150 | 340 | } | 340 | } |
151 | 341 | 341 | ||
152 | 342 | TimedArcPetriNetTrace tapnTrace = parseTrace(!errorOutput.contains("Trace:") ? errorOutput : (errorOutput.split("Trace:")[1]), options, model, exportedModel, query, queryResult.value1()); | 342 | TimedArcPetriNetTrace tapnTrace = parseTrace(!errorOutput.contains("Trace:") ? errorOutput : (errorOutput.split("Trace:")[1]), options, model, exportedModel, query, queryResult.value1()); |
154 | 343 | return new VerificationResult<TimedArcPetriNetTrace>(queryResult.value1(), tapnTrace, secondaryTrace, runner.getRunningTime(), queryResult.value2(), false); | 343 | return new VerificationResult<TimedArcPetriNetTrace>(queryResult.value1(), tapnTrace, secondaryTrace, runner.getRunningTime(), queryResult.value2(), false, standardOutput); |
155 | 344 | } | 344 | } |
156 | 345 | } | 345 | } |
157 | 346 | } | 346 | } |
158 | 347 | 347 | ||
159 | === modified file 'src/pipe/gui/RunVerification.java' | |||
160 | --- src/pipe/gui/RunVerification.java 2020-07-20 07:19:51 +0000 | |||
161 | +++ src/pipe/gui/RunVerification.java 2020-12-16 21:23:18 +0000 | |||
162 | @@ -11,13 +11,7 @@ | |||
163 | 11 | import java.util.Comparator; | 11 | import java.util.Comparator; |
164 | 12 | import java.util.List; | 12 | import java.util.List; |
165 | 13 | 13 | ||
173 | 14 | import javax.swing.JButton; | 14 | import javax.swing.*; |
167 | 15 | import javax.swing.JLabel; | ||
168 | 16 | import javax.swing.JOptionPane; | ||
169 | 17 | import javax.swing.JPanel; | ||
170 | 18 | import javax.swing.JScrollPane; | ||
171 | 19 | import javax.swing.JTable; | ||
172 | 20 | import javax.swing.SwingUtilities; | ||
174 | 21 | import javax.swing.table.DefaultTableModel; | 15 | import javax.swing.table.DefaultTableModel; |
175 | 22 | import javax.swing.table.TableModel; | 16 | import javax.swing.table.TableModel; |
176 | 23 | import javax.swing.table.TableRowSorter; | 17 | import javax.swing.table.TableRowSorter; |
177 | @@ -220,6 +214,43 @@ | |||
178 | 220 | return fullPanel; | 214 | return fullPanel; |
179 | 221 | } | 215 | } |
180 | 222 | 216 | ||
181 | 217 | private JPanel createRawQueryPanel(final String rawOutput) { | ||
182 | 218 | final JPanel fullPanel = new JPanel(new GridBagLayout()); | ||
183 | 219 | |||
184 | 220 | JTextArea rawQueryLabel = new JTextArea(rawOutput); | ||
185 | 221 | rawQueryLabel.setEditable(false); // set textArea non-editable | ||
186 | 222 | JScrollPane scroll = new JScrollPane(rawQueryLabel); | ||
187 | 223 | scroll.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS); | ||
188 | 224 | scroll.setPreferredSize(new Dimension(640,400)); | ||
189 | 225 | |||
190 | 226 | GridBagConstraints gbc = new GridBagConstraints(); | ||
191 | 227 | gbc.fill = GridBagConstraints.HORIZONTAL; | ||
192 | 228 | gbc.weightx = 0; | ||
193 | 229 | gbc.weighty = 0; | ||
194 | 230 | gbc.gridx = 0; | ||
195 | 231 | gbc.gridy = 0; | ||
196 | 232 | gbc.anchor = GridBagConstraints.WEST; | ||
197 | 233 | fullPanel.add(scroll, gbc); | ||
198 | 234 | |||
199 | 235 | // Make window resizeable | ||
200 | 236 | fullPanel.addHierarchyListener(new HierarchyListener() { | ||
201 | 237 | public void hierarchyChanged(HierarchyEvent e) { | ||
202 | 238 | //when the hierarchy changes get the ancestor for the message | ||
203 | 239 | Window window = SwingUtilities.getWindowAncestor(fullPanel); | ||
204 | 240 | //check to see if the ancestor is an instance of Dialog and isn't resizable | ||
205 | 241 | if (window instanceof Dialog) { | ||
206 | 242 | Dialog dialog = (Dialog) window; | ||
207 | 243 | if (!dialog.isResizable()) { | ||
208 | 244 | //set resizable to true | ||
209 | 245 | dialog.setResizable(true); | ||
210 | 246 | } | ||
211 | 247 | } | ||
212 | 248 | } | ||
213 | 249 | }); | ||
214 | 250 | |||
215 | 251 | return fullPanel; | ||
216 | 252 | } | ||
217 | 253 | |||
218 | 223 | private Object[][] extractArrayFromTransitionStatistics(final VerificationResult<TAPNNetworkTrace> result) { | 254 | private Object[][] extractArrayFromTransitionStatistics(final VerificationResult<TAPNNetworkTrace> result) { |
219 | 224 | List<Tuple<String, Integer>> transistionStats = result.getTransitionStatistics(); | 255 | List<Tuple<String, Integer>> transistionStats = result.getTransitionStatistics(); |
220 | 225 | Object[][] out = new Object[transistionStats.size()][2]; | 256 | Object[][] out = new Object[transistionStats.size()][2]; |
221 | @@ -283,11 +314,23 @@ | |||
222 | 283 | JLabel reductionStatsLabet = new JLabel(toHTML(result.getReductionResultAsString())); | 314 | JLabel reductionStatsLabet = new JLabel(toHTML(result.getReductionResultAsString())); |
223 | 284 | gbc = new GridBagConstraints(); | 315 | gbc = new GridBagConstraints(); |
224 | 285 | gbc.gridx = 0; | 316 | gbc.gridx = 0; |
226 | 286 | gbc.gridy = 5; | 317 | gbc.gridy = 6; |
227 | 287 | gbc.insets = new Insets(0,0,20,-90); | 318 | gbc.insets = new Insets(0,0,20,-90); |
228 | 288 | gbc.anchor = GridBagConstraints.WEST; | 319 | gbc.anchor = GridBagConstraints.WEST; |
229 | 289 | panel.add(reductionStatsLabet, gbc); | 320 | panel.add(reductionStatsLabet, gbc); |
230 | 290 | } | 321 | } |
231 | 322 | if (result.getRawOutput() != null) { | ||
232 | 323 | JButton showRawQueryButton = new JButton("Show raw query results"); | ||
233 | 324 | showRawQueryButton.addActionListener(arg0 -> { | ||
234 | 325 | JOptionPane.showMessageDialog(panel, createRawQueryPanel(result.getRawOutput()), "Raw query results", JOptionPane.INFORMATION_MESSAGE); | ||
235 | 326 | }); | ||
236 | 327 | gbc = new GridBagConstraints(); | ||
237 | 328 | gbc.gridx = 0; | ||
238 | 329 | gbc.gridy = 5; | ||
239 | 330 | gbc.insets = new Insets(10,0,10,0); | ||
240 | 331 | gbc.anchor = GridBagConstraints.WEST; | ||
241 | 332 | panel.add(showRawQueryButton, gbc); | ||
242 | 333 | } | ||
243 | 291 | } else if (modelChecker.supportsStats() && !result.isSolvedUsingStateEquation() && isCTLQuery){ | 334 | } else if (modelChecker.supportsStats() && !result.isSolvedUsingStateEquation() && isCTLQuery){ |
244 | 292 | displayStats(panel, result.getCTLStatsAsString(), modelChecker.getStatsExplanations()); | 335 | displayStats(panel, result.getCTLStatsAsString(), modelChecker.getStatsExplanations()); |
245 | 293 | 336 | ||
246 | @@ -296,7 +339,7 @@ | |||
247 | 296 | if(result.isSolvedUsingStateEquation()){ | 339 | if(result.isSolvedUsingStateEquation()){ |
248 | 297 | gbc = new GridBagConstraints(); | 340 | gbc = new GridBagConstraints(); |
249 | 298 | gbc.gridx = 0; | 341 | gbc.gridx = 0; |
251 | 299 | gbc.gridy = 5; | 342 | gbc.gridy = 6; |
252 | 300 | gbc.insets = new Insets(0,0,15,0); | 343 | gbc.insets = new Insets(0,0,15,0); |
253 | 301 | gbc.anchor = GridBagConstraints.WEST; | 344 | gbc.anchor = GridBagConstraints.WEST; |
254 | 302 | panel.add(new JLabel(toHTML("The query was resolved using state equations.")), gbc); | 345 | panel.add(new JLabel(toHTML("The query was resolved using state equations.")), gbc); |
255 | @@ -304,14 +347,14 @@ | |||
256 | 304 | 347 | ||
257 | 305 | gbc = new GridBagConstraints(); | 348 | gbc = new GridBagConstraints(); |
258 | 306 | gbc.gridx = 0; | 349 | gbc.gridx = 0; |
260 | 307 | gbc.gridy = 6; | 350 | gbc.gridy = 7; |
261 | 308 | gbc.gridwidth = 2; | 351 | gbc.gridwidth = 2; |
262 | 309 | gbc.anchor = GridBagConstraints.WEST; | 352 | gbc.anchor = GridBagConstraints.WEST; |
263 | 310 | panel.add(new JLabel(result.getVerificationTimeString()), gbc); | 353 | panel.add(new JLabel(result.getVerificationTimeString()), gbc); |
264 | 311 | 354 | ||
265 | 312 | gbc = new GridBagConstraints(); | 355 | gbc = new GridBagConstraints(); |
266 | 313 | gbc.gridx = 0; | 356 | gbc.gridx = 0; |
268 | 314 | gbc.gridy = 7; | 357 | gbc.gridy = 8; |
269 | 315 | gbc.gridwidth = 2; | 358 | gbc.gridwidth = 2; |
270 | 316 | gbc.anchor = GridBagConstraints.WEST; | 359 | gbc.anchor = GridBagConstraints.WEST; |
271 | 317 | panel.add(new JLabel("Estimated memory usage: "+MemoryMonitor.getPeakMemory()), gbc); | 360 | panel.add(new JLabel("Estimated memory usage: "+MemoryMonitor.getPeakMemory()), gbc); |
Tested and works fine.